summaryrefslogtreecommitdiff
path: root/src/arch/arm/isa/insts/fp.isa
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2010-06-02 12:58:14 -0500
committerGabe Black <gblack@eecs.umich.edu>2010-06-02 12:58:14 -0500
commitcd0a6a1303d204bd9c594e40c71ad67adb0cd092 (patch)
treefc4ec4ce44f14623ffd939b980f61c7cf100130a /src/arch/arm/isa/insts/fp.isa
parent65f5204325f22ae8cc2b42da5ef046c55acf2a9d (diff)
downloadgem5-cd0a6a1303d204bd9c594e40c71ad67adb0cd092.tar.xz
ARM: Implement the VFP version of vneg.
Diffstat (limited to 'src/arch/arm/isa/insts/fp.isa')
-rw-r--r--src/arch/arm/isa/insts/fp.isa24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/arch/arm/isa/insts/fp.isa b/src/arch/arm/isa/insts/fp.isa
index ef79ea420..bffdde235 100644
--- a/src/arch/arm/isa/insts/fp.isa
+++ b/src/arch/arm/isa/insts/fp.isa
@@ -258,4 +258,28 @@ let {{
header_output += RegRegRegOpDeclare.subst(vmulDIop);
decoder_output += RegRegRegOpConstructor.subst(vmulDIop);
exec_output += PredOpExecute.subst(vmulDIop);
+
+ vnegSCode = '''
+ FpDest = -FpOp1;
+ '''
+ vnegSIop = InstObjParams("vnegs", "VnegS", "RegRegOp",
+ { "code": vnegSCode,
+ "predicate_test": predicateTest }, [])
+ header_output += RegRegOpDeclare.subst(vnegSIop);
+ decoder_output += RegRegOpConstructor.subst(vnegSIop);
+ exec_output += PredOpExecute.subst(vnegSIop);
+
+ vnegDCode = '''
+ IntDoubleUnion cOp1, cDest;
+ cOp1.bits = ((uint64_t)FpOp1P0.uw | ((uint64_t)FpOp1P1.uw << 32));
+ cDest.fp = -cOp1.fp;
+ FpDestP0.uw = cDest.bits;
+ FpDestP1.uw = cDest.bits >> 32;
+ '''
+ vnegDIop = InstObjParams("vnegd", "VnegD", "RegRegOp",
+ { "code": vnegDCode,
+ "predicate_test": predicateTest }, [])
+ header_output += RegRegOpDeclare.subst(vnegDIop);
+ decoder_output += RegRegOpConstructor.subst(vnegDIop);
+ exec_output += PredOpExecute.subst(vnegDIop);
}};