Deleted Added
sdiff udiff text old ( 12236:126ac9da6050 ) new ( 13738:84439021dcf6 )
full compact
1// -*- mode:c++ -*-
2
3// Copyright (c) 2010-2013,2016 ARM Limited
4// All rights reserved
5//
6// The license below extends only to copyright in the software and shall
7// not be construed as granting a license to any other intellectual
8// property including but not limited to intellectual property relating
9// to a hardware implementation of the functionality of the software
10// licensed hereunder. You may use the software subject to the license
11// terms below provided that you ensure that this notice is replicated

--- 976 unchanged lines hidden (view full) ---

988 vcvtFpSIntDRIop = InstObjParams("vcvtr", "VcvtFpSIntDR", "FpRegRegOp",
989 { "code": vcvtFpSIntDRCode,
990 "predicate_test": predicateTest,
991 "op_class": "SimdFloatCvtOp" }, [])
992 header_output += FpRegRegOpDeclare.subst(vcvtFpSIntDRIop);
993 decoder_output += FpRegRegOpConstructor.subst(vcvtFpSIntDRIop);
994 exec_output += PredOpExecute.subst(vcvtFpSIntDRIop);
995
996 vcvtFpUIntSCode = vfpEnabledCheckCode + '''
997 FPSCR fpscr = (FPSCR) FpscrExc;
998 vfpFlushToZero(fpscr, FpOp1);
999 VfpSavedState state = prepFpState(fpscr.rMode);
1000 fesetround(FeRoundZero);
1001 __asm__ __volatile__("" : "=m" (FpOp1) : "m" (FpOp1));
1002 FpDest_uw = vfpFpToFixed<float>(FpOp1, false, 32, 0);
1003 __asm__ __volatile__("" :: "m" (FpDest_uw));
1004 finishVfp(fpscr, state, fpscr.fz);
1005 FpscrExc = fpscr;
1006 '''
1007 vcvtFpUIntSIop = InstObjParams("vcvt", "VcvtFpUIntS", "FpRegRegOp",
1008 { "code": vcvtFpUIntSCode,
1009 "predicate_test": predicateTest,
1010 "op_class": "SimdFloatCvtOp" }, [])
1011 header_output += FpRegRegOpDeclare.subst(vcvtFpUIntSIop);
1012 decoder_output += FpRegRegOpConstructor.subst(vcvtFpUIntSIop);
1013 exec_output += PredOpExecute.subst(vcvtFpUIntSIop);
1014
1015 vcvtFpUIntDCode = vfpEnabledCheckCode + '''
1016 FPSCR fpscr = (FPSCR) FpscrExc;
1017 double cOp1 = dbl(FpOp1P0_uw, FpOp1P1_uw);
1018 vfpFlushToZero(fpscr, cOp1);
1019 VfpSavedState state = prepFpState(fpscr.rMode);
1020 fesetround(FeRoundZero);
1021 __asm__ __volatile__("" : "=m" (cOp1) : "m" (cOp1));
1022 uint64_t result = vfpFpToFixed<double>(cOp1, false, 32, 0);
1023 __asm__ __volatile__("" :: "m" (result));
1024 finishVfp(fpscr, state, fpscr.fz);
1025 FpDestP0_uw = result;
1026 FpscrExc = fpscr;
1027 '''
1028 vcvtFpUIntDIop = InstObjParams("vcvt", "VcvtFpUIntD", "FpRegRegOp",
1029 { "code": vcvtFpUIntDCode,
1030 "predicate_test": predicateTest,
1031 "op_class": "SimdFloatCvtOp" }, [])
1032 header_output += FpRegRegOpDeclare.subst(vcvtFpUIntDIop);
1033 decoder_output += FpRegRegOpConstructor.subst(vcvtFpUIntDIop);
1034 exec_output += PredOpExecute.subst(vcvtFpUIntDIop);
1035
1036 vcvtFpSIntSCode = vfpEnabledCheckCode + '''
1037 FPSCR fpscr = (FPSCR) FpscrExc;
1038 vfpFlushToZero(fpscr, FpOp1);
1039 VfpSavedState state = prepFpState(fpscr.rMode);
1040 fesetround(FeRoundZero);
1041 __asm__ __volatile__("" : "=m" (FpOp1) : "m" (FpOp1));
1042 FpDest_sw = vfpFpToFixed<float>(FpOp1, true, 32, 0);
1043 __asm__ __volatile__("" :: "m" (FpDest_sw));
1044 finishVfp(fpscr, state, fpscr.fz);
1045 FpscrExc = fpscr;
1046 '''
1047 vcvtFpSIntSIop = InstObjParams("vcvt", "VcvtFpSIntS", "FpRegRegOp",
1048 { "code": vcvtFpSIntSCode,
1049 "predicate_test": predicateTest,
1050 "op_class": "SimdFloatCvtOp" }, [])
1051 header_output += FpRegRegOpDeclare.subst(vcvtFpSIntSIop);
1052 decoder_output += FpRegRegOpConstructor.subst(vcvtFpSIntSIop);
1053 exec_output += PredOpExecute.subst(vcvtFpSIntSIop);
1054
1055 vcvtFpSIntDCode = vfpEnabledCheckCode + '''
1056 FPSCR fpscr = (FPSCR) FpscrExc;
1057 double cOp1 = dbl(FpOp1P0_uw, FpOp1P1_uw);
1058 vfpFlushToZero(fpscr, cOp1);
1059 VfpSavedState state = prepFpState(fpscr.rMode);
1060 fesetround(FeRoundZero);
1061 __asm__ __volatile__("" : "=m" (cOp1) : "m" (cOp1));
1062 int64_t result = vfpFpToFixed<double>(cOp1, true, 32, 0);
1063 __asm__ __volatile__("" :: "m" (result));
1064 finishVfp(fpscr, state, fpscr.fz);
1065 FpDestP0_uw = result;
1066 FpscrExc = fpscr;
1067 '''
1068 vcvtFpSIntDIop = InstObjParams("vcvt", "VcvtFpSIntD", "FpRegRegOp",
1069 { "code": vcvtFpSIntDCode,
1070 "predicate_test": predicateTest,
1071 "op_class": "SimdFloatCvtOp" }, [])
1072 header_output += FpRegRegOpDeclare.subst(vcvtFpSIntDIop);
1073 decoder_output += FpRegRegOpConstructor.subst(vcvtFpSIntDIop);
1074 exec_output += PredOpExecute.subst(vcvtFpSIntDIop);
1075
1076 vcvtFpSFpDCode = vfpEnabledCheckCode + '''
1077 FPSCR fpscr = (FPSCR) FpscrExc;
1078 vfpFlushToZero(fpscr, FpOp1);
1079 VfpSavedState state = prepFpState(fpscr.rMode);
1080 __asm__ __volatile__("" : "=m" (FpOp1) : "m" (FpOp1));
1081 double cDest = fixFpSFpDDest(FpscrExc, FpOp1);
1082 __asm__ __volatile__("" :: "m" (cDest));

--- 692 unchanged lines hidden ---