summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/jit/codegenxarch.cpp2
-rw-r--r--src/jit/emit.cpp7
-rw-r--r--src/jit/emit.h1
3 files changed, 9 insertions, 1 deletions
diff --git a/src/jit/codegenxarch.cpp b/src/jit/codegenxarch.cpp
index c6337288cf..8c403dc4f1 100644
--- a/src/jit/codegenxarch.cpp
+++ b/src/jit/codegenxarch.cpp
@@ -7331,7 +7331,7 @@ void CodeGen::genSSE2BitwiseOp(GenTreePtr treeNode)
if (*bitMask == nullptr)
{
assert(cnsAddr != nullptr);
- *bitMask = compiler->eeFindJitDataOffs(getEmitter()->emitDataConst(cnsAddr, genTypeSize(targetType), dblAlign));
+ *bitMask = getEmitter()->emitAnyConst(cnsAddr, genTypeSize(targetType), dblAlign);
}
// We need an additional register for bitmask.
diff --git a/src/jit/emit.cpp b/src/jit/emit.cpp
index bb4db5fb6e..970362768c 100644
--- a/src/jit/emit.cpp
+++ b/src/jit/emit.cpp
@@ -5364,6 +5364,13 @@ UNATIVE_OFFSET emitter::emitDataConst(const void* cnsAddr, unsigned cnsSize, boo
}
#ifndef LEGACY_BACKEND
+
+CORINFO_FIELD_HANDLE emitter::emitAnyConst(const void* cnsAddr, unsigned cnsSize, bool dblAlign)
+{
+ UNATIVE_OFFSET cnum = emitDataConst(cnsAddr, cnsSize, dblAlign);
+ return emitComp->eeFindJitDataOffs(cnum);
+}
+
// Generates a float or double data section constant and returns field handle representing
// the data offset to access the constant. This is called by emitInsBinary() in case
// of contained float of double constants.
diff --git a/src/jit/emit.h b/src/jit/emit.h
index 9092652afe..e438d85329 100644
--- a/src/jit/emit.h
+++ b/src/jit/emit.h
@@ -1710,6 +1710,7 @@ private:
UNATIVE_OFFSET emitInstCodeSz(instrDesc* id);
#ifndef LEGACY_BACKEND
+ CORINFO_FIELD_HANDLE emitAnyConst(const void* cnsAddr, unsigned cnsSize, bool dblAlign);
CORINFO_FIELD_HANDLE emitFltOrDblConst(double constValue, emitAttr attr);
regNumber emitInsBinary(instruction ins, emitAttr attr, GenTree* dst, GenTree* src);
regNumber emitInsTernary(instruction ins, emitAttr attr, GenTree* dst, GenTree* src1, GenTree* src2);