Skip to content

Commit cd33607

Browse files
kddnewtonmeta-codesync[bot]
authored andcommitted
Use asmjit's embed instead of db
Summary: db is specific to x86-64, whereas embed is supported on all architectures. Reviewed By: alexmalyshev Differential Revision: D86327210 fbshipit-source-id: ef237c21fc2428b29d8165d946ef2152d2ca673e
1 parent 8112d72 commit cd33607

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

cinderx/Jit/codegen/autogen.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ void TranslateGuard(Environ* env, const Instruction* instr) {
262262
}
263263

264264
void TranslateDeoptPatchpoint(Environ* env, const Instruction* instr) {
265-
#if defined(CINDER_X86_64)
266265
auto as = env->as;
267266

268267
auto patcher =
@@ -273,9 +272,9 @@ void TranslateDeoptPatchpoint(Environ* env, const Instruction* instr) {
273272
// we can prove that the following bytes are not the target of a jump.
274273
auto patchpoint_label = as->newLabel();
275274
as->bind(patchpoint_label);
276-
for (uint8_t byte : patcher->storedBytes()) {
277-
as->db(byte);
278-
}
275+
276+
auto stored_bytes = patcher->storedBytes();
277+
as->embed(stored_bytes.data(), stored_bytes.size());
279278

280279
// Fill in deopt metadata
281280
auto index = instr->getInput(1)->getConstant();
@@ -288,9 +287,6 @@ void TranslateDeoptPatchpoint(Environ* env, const Instruction* instr) {
288287
// once code generation has completed.
289288
env->pending_deopt_patchers.emplace_back(
290289
patcher, patchpoint_label, deopt_label);
291-
#else
292-
CINDER_UNSUPPORTED
293-
#endif
294290
}
295291

296292
void TranslateCompare(Environ* env, const Instruction* instr) {

0 commit comments

Comments
 (0)