Skip to content

Instantly share code, notes, and snippets.

@bdw
Created November 24, 2014 15:09
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 bdw/aa900db7e31128cd98a3 to your computer and use it in GitHub Desktop.
Save bdw/aa900db7e31128cd98a3 to your computer and use it in GitHub Desktop.
which is better (both are corect)
#!/usr/bin/env nqp-m
my int $i := 0;
sub foo (int $x) {
if (nqp::cmp_i($x, 50) > 0) {
nqp::say("$x: OH HAI");
} else {
nqp::say("$x: OH NOES");
}
}
while $i < 100 {
$i := $i + 1;
foo($i);
foo(100 - $i);
}
diff --git a/3rdparty/dynasm b/3rdparty/dynasm
--- a/3rdparty/dynasm
+++ b/3rdparty/dynasm
@@ -1 +1 @@
-Subproject commit 12ace5e3a50238f69a3616e65b3e9ca188c41ac5
+Subproject commit 12ace5e3a50238f69a3616e65b3e9ca188c41ac5-dirty
diff --git a/src/jit/emit_x64.dasc b/src/jit/emit_x64.dasc
index 7afbb12..eb596ac 100644
--- a/src/jit/emit_x64.dasc
+++ b/src/jit/emit_x64.dasc
@@ -807,11 +807,10 @@ void MVM_jit_emit_primitive(MVMThreadContext *tc, MVMJitGraph *jg,
/* copy the right comparison bit to the lower byte of the rax
register */
| setg TMP2b;
- | movzx TMP2, TMP2b;
| setl TMP3b;
- | movzx TMP3, TMP3b;
- | sub TMP2, TMP3;
- | mov WORK[reg_a], TMP2;
+ | sub TMP2b, TMP3b;
+ | movsx TMP2, TMP2b;
+ | mov qword WORK[reg_a], TMP2;
break;
}
case MVM_OP_not_i: {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment