Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@MasterDuke17
Created September 27, 2022 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MasterDuke17/76057f0d70c5247729b33ab095bf4e8c to your computer and use it in GitHub Desktop.
Save MasterDuke17/76057f0d70c5247729b33ab095bf4e8c to your computer and use it in GitHub Desktop.
+ //case MVM_OP_cmp_u :
case MVM_OP_cmp_i : {
MVMint32 reg_a = ins->operands[0].reg.orig;
MVMint32 reg_b = ins->operands[1].reg.orig;
@@ -1485,9 +1506,16 @@ void MVM_jit_emit_primitive(MVMThreadContext *tc, MVMJitCompiler *compiler, MVMJ
| cmp TMP1, WORK[reg_c];
/* copy the right comparison bit to the lower byte of the rax
register */
- | setg TMP2b;
+ fprintf(stderr, "o = %d, cmp_i = %d\n", ins->info->opcode, MVM_OP_cmp_i);
+ if (ins->info->opcode == MVM_OP_cmp_i)
+ | setg TMP2b;
+ else
+ | setg TMP2b;
| movzx TMP2, TMP2b;
- | setl TMP3b;
+ if (ins->info->opcode == MVM_OP_cmp_i)
+ | setl TMP3b;
+ else
+ | setl TMP3b;
| movzx TMP3, TMP3b;
| sub TMP2, TMP3;
| mov WORK[reg_a], TMP2;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment