Skip to content

Commit

Permalink
Merge pull request #47 from lukego/travis-jit-options
Browse files Browse the repository at this point in the history
Travis CI: Test -O3/-O2/-O1/-joff separately
  • Loading branch information
lukego authored Mar 19, 2017
2 parents 9fcb036 + b1cfd27 commit 693909f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
language: nix
sudo: false
env:
- jit=-O3
- jit=-O2
- jit=-O1
- jit=-joff
script:
- nix-build
- result/bin/raptorjit -e 'for i = 1, 1000 do end'
- git submodule init submodules/raptorjit-testsuite
- (cd submodules/raptorjit-testsuite/test; ../../../result/bin/raptorjit test.lua +slow)
- (cd submodules/raptorjit-testsuite/test; ../../../result/bin/raptorjit $jit test.lua +slow)
4 changes: 2 additions & 2 deletions src/lj_asm_x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -1373,8 +1373,8 @@ static void asm_cnew(ASMState *as, IRIns *ir)
Reg r64 = sz == 8 ? REX_64 : 0;
if (irref_isk(ir->op2)) {
IRIns *irk = IR(ir->op2);
uint64_t k = irk->o == IR_KINT64 ? ir_k64(irk)->u64 :
(uint64_t)(uint32_t)irk->i;
uint64_t k = (irk->o == IR_KINT64 || irk->o == IR_KPTR || irk->o == IR_KPTR)
? ir_k64(irk)->u64 : (uint64_t)(uint32_t)irk->i;
if (sz == 4 || checki32((int64_t)k)) {
emit_i32(as, (int32_t)k);
emit_rmro(as, XO_MOVmi, r64, RID_RET, sizeof(GCcdata));
Expand Down

0 comments on commit 693909f

Please sign in to comment.