MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / mult

Method mult

src/hx/cppia/CppiaCompiler.cpp:1236–1265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1234 }
1235
1236 void mult(const JitVal &inDest, const JitVal &v0, const JitVal &v1, bool asFloat ) HXCPP_OVERRIDE
1237 {
1238 sljit_s32 tDest = getTarget(inDest);
1239 sljit_s32 t0 = getTarget(v0);
1240 sljit_s32 t1 = getTarget(v1);
1241 bool isFloat = v0.type==jtFloat;
1242
1243 if (asFloat != isFloat)
1244 {
1245 if (isFloat)
1246 {
1247 emit_fop2(SLJIT_MUL_F64, sJitTempF0, v0, v1 );
1248 convert( sJitTempF0, etFloat, inDest, etInt );
1249 }
1250 else
1251 {
1252 emit_op2(SLJIT_MUL32, sJitTemp0, v0.as(jtInt), v1.as(jtInt) );
1253 convert( sJitTemp0, etInt, inDest, etFloat );
1254 }
1255 }
1256 else
1257 {
1258 if (isFloat)
1259 {
1260 emit_fop2(SLJIT_MUL_F64, inDest, v0, v1 );
1261 }
1262 else
1263 emit_op2(SLJIT_MUL32, inDest, v0, v1 );
1264 }
1265 }
1266
1267 void sub(const JitVal &inDest, const JitVal &v0, const JitVal &v1, bool asFloat ) HXCPP_OVERRIDE
1268 {

Callers 4

genSetterFunction · 0.80
genCodeMethod · 0.80
genCodeMethod · 0.80
genCodeMethod · 0.80

Calls 2

convertFunction · 0.85
asMethod · 0.80

Tested by

no test coverage detected