Skip to content

Commit

Permalink
bootstrap.x86: fix assembler code bug in fixnum*
Browse files Browse the repository at this point in the history
Now the operands are kept in EBP and ECX and the vm-reg (EBX) is not
used unnecessarily
  • Loading branch information
bjourne authored and erg committed May 25, 2015
1 parent 5dcaf25 commit c2a70d1
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions basis/bootstrap/assembler/x86.32.factor
Expand Up @@ -104,7 +104,7 @@ IN: bootstrap.x86
] \ c-to-factor define-sub-primitive

: signal-handler-save-regs ( -- regs )
{ EAX ECX EDX EBX EBP ESI EDI } ;
{ EAX EBX ECX EDX EBP EDI ESI } ;

[
EAX ds-reg [] MOV
Expand Down Expand Up @@ -244,18 +244,17 @@ IN: bootstrap.x86
ds-reg 4 SUB
jit-load-vm
jit-save-context
EBX ds-reg [] MOV
EAX EBX MOV
ECX ds-reg [] MOV
EAX ECX MOV
EBP ds-reg 4 [+] MOV
EBP tag-bits get SAR
! clobbers EDX
EBP IMUL
ds-reg [] EAX MOV
[ JNO ]
[
EBX tag-bits get SAR
jit-load-vm

EBX EBP vm-reg "overflow_fixnum_multiply" jit-call-3arg
ECX tag-bits get SAR
ECX EBP vm-reg "overflow_fixnum_multiply" jit-call-3arg
]
jit-conditional
] \ fixnum* define-sub-primitive
Expand Down

0 comments on commit c2a70d1

Please sign in to comment.