summaryrefslogtreecommitdiff
path: root/src/arch/arm/isa/insts
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
commit9e32ff3491b3af115896798af3fd8c3606aac50f (patch)
treeb7b1b6de87ac41f9829170f22580225ab65788f2 /src/arch/arm/isa/insts
parentcd0a6a1303d204bd9c594e40c71ad67adb0cd092 (diff)
downloadgem5-9e32ff3491b3af115896798af3fd8c3606aac50f.tar.xz
ARM: Implement the VFP version of vabs.
Diffstat (limited to 'src/arch/arm/isa/insts')
-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 bffdde235..56edb23f2 100644
--- a/src/arch/arm/isa/insts/fp.isa
+++ b/src/arch/arm/isa/insts/fp.isa
@@ -282,4 +282,28 @@ let {{
header_output += RegRegOpDeclare.subst(vnegDIop);
decoder_output += RegRegOpConstructor.subst(vnegDIop);
exec_output += PredOpExecute.subst(vnegDIop);
+
+ vabsSCode = '''
+ FpDest = fabsf(FpOp1);
+ '''
+ vabsSIop = InstObjParams("vabss", "VabsS", "RegRegOp",
+ { "code": vabsSCode,
+ "predicate_test": predicateTest }, [])
+ header_output += RegRegOpDeclare.subst(vabsSIop);
+ decoder_output += RegRegOpConstructor.subst(vabsSIop);
+ exec_output += PredOpExecute.subst(vabsSIop);
+
+ vabsDCode = '''
+ IntDoubleUnion cOp1, cDest;
+ cOp1.bits = ((uint64_t)FpOp1P0.uw | ((uint64_t)FpOp1P1.uw << 32));
+ cDest.fp = fabs(cOp1.fp);
+ FpDestP0.uw = cDest.bits;
+ FpDestP1.uw = cDest.bits >> 32;
+ '''
+ vabsDIop = InstObjParams("vabsd", "VabsD", "RegRegOp",
+ { "code": vabsDCode,
+ "predicate_test": predicateTest }, [])
+ header_output += RegRegOpDeclare.subst(vabsDIop);
+ decoder_output += RegRegOpConstructor.subst(vabsDIop);
+ exec_output += PredOpExecute.subst(vabsDIop);
}};