Renamed const pool functions to be more descriptive and have less collisions.

This commit is contained in:
kobalicekp
2014-04-24 02:13:51 +02:00
parent 99f50915ec
commit 70bd453721
2 changed files with 17 additions and 16 deletions

View File

@@ -2361,8 +2361,8 @@ struct X86Test_ConstPoolBase : public X86Test {
GpVar v0(c, kVarTypeInt32, "v0"); GpVar v0(c, kVarTypeInt32, "v0");
GpVar v1(c, kVarTypeInt32, "v1"); GpVar v1(c, kVarTypeInt32, "v1");
Mem c0(c.newConst4(kConstScopeLocal, 200)); Mem c0(c.newInt32Const(kConstScopeLocal, 200));
Mem c1(c.newConst4(kConstScopeLocal, 33)); Mem c1(c.newInt32Const(kConstScopeLocal, 33));
c.mov(v0, c0); c.mov(v0, c0);
c.mov(v1, c1); c.mov(v1, c1);
@@ -2386,7 +2386,6 @@ struct X86Test_ConstPoolBase : public X86Test {
} }
}; };
// ============================================================================ // ============================================================================
// [X86Test_Dummy] // [X86Test_Dummy]
// ============================================================================ // ============================================================================

View File

@@ -1477,22 +1477,24 @@ struct X86X64Compiler : public BaseCompiler {
return m; return m;
} }
ASMJIT_INLINE Mem newConst1(uint32_t scope, uint8_t val) { return newConst(scope, &val, 1); } ASMJIT_INLINE Mem newByteConst(uint32_t scope, uint8_t val) { return newConst(scope, &val, 1); }
ASMJIT_INLINE Mem newWordConst(uint32_t scope, uint16_t val) { return newConst(scope, &val, 2); }
ASMJIT_INLINE Mem newDWordConst(uint32_t scope, uint32_t val) { return newConst(scope, &val, 4); }
ASMJIT_INLINE Mem newQWordConst(uint32_t scope, uint64_t val) { return newConst(scope, &val, 8); }
ASMJIT_INLINE Mem newConst2(uint32_t scope, int16_t val) { return newConst(scope, &val, 2); } ASMJIT_INLINE Mem newInt16Const(uint32_t scope, int16_t val) { return newConst(scope, &val, 2); }
ASMJIT_INLINE Mem newConst2(uint32_t scope, uint16_t val) { return newConst(scope, &val, 2); } ASMJIT_INLINE Mem newUInt16Const(uint32_t scope, uint16_t val) { return newConst(scope, &val, 2); }
ASMJIT_INLINE Mem newInt32Const(uint32_t scope, int32_t val) { return newConst(scope, &val, 4); }
ASMJIT_INLINE Mem newUInt32Const(uint32_t scope, uint32_t val) { return newConst(scope, &val, 4); }
ASMJIT_INLINE Mem newInt64Const(uint32_t scope, int64_t val) { return newConst(scope, &val, 8); }
ASMJIT_INLINE Mem newUInt64Const(uint32_t scope, uint64_t val) { return newConst(scope, &val, 8); }
ASMJIT_INLINE Mem newConst4(uint32_t scope, int32_t val) { return newConst(scope, &val, 4); } ASMJIT_INLINE Mem newFloatConst(uint32_t scope, float val) { return newConst(scope, &val, 4); }
ASMJIT_INLINE Mem newConst4(uint32_t scope, uint32_t val) { return newConst(scope, &val, 4); } ASMJIT_INLINE Mem newDoubleConst(uint32_t scope, double val) { return newConst(scope, &val, 8); }
ASMJIT_INLINE Mem newConst4(uint32_t scope, float val) { return newConst(scope, &val, 4); }
ASMJIT_INLINE Mem newConst8(uint32_t scope, int64_t val) { return newConst(scope, &val, 8); } ASMJIT_INLINE Mem newMmConst(uint32_t scope, const Vec64Data& val) { return newConst(scope, &val, 8); }
ASMJIT_INLINE Mem newConst8(uint32_t scope, uint64_t val) { return newConst(scope, &val, 8); } ASMJIT_INLINE Mem newXmmConst(uint32_t scope, const Vec128Data& val) { return newConst(scope, &val, 16); }
ASMJIT_INLINE Mem newConst8(uint32_t scope, double val) { return newConst(scope, &val, 8); } ASMJIT_INLINE Mem newYmmConst(uint32_t scope, const Vec256Data& val) { return newConst(scope, &val, 32); }
ASMJIT_INLINE Mem newConst8(uint32_t scope, const Vec64Data& val) { return newConst(scope, &val, 8); }
ASMJIT_INLINE Mem newConst16(uint32_t scope, const Vec128Data& val) { return newConst(scope, &val, 16); }
ASMJIT_INLINE Mem newConst32(uint32_t scope, const Vec256Data& val) { return newConst(scope, &val, 32); }
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// [Embed] // [Embed]