Skip to content

Commit

Permalink
Make bt_translate_and_run use regparm(3).
Browse files Browse the repository at this point in the history
  • Loading branch information
nelhage committed Nov 29, 2010
1 parent 2420b45 commit d8087c1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bt.cpp
Expand Up @@ -44,7 +44,7 @@ extern "C" void bt_continue_chain(void);
extern "C" void bt_continue_ic(void);
extern "C" void bt_interrupt(void);

extern "C" void bt_translate_and_run(beta_cpu *cpu, uint32_t used, ccbuff chainptr) __attribute__((noreturn, used));
extern "C" void bt_translate_and_run(beta_cpu *cpu, uint32_t used, ccbuff chainptr) __attribute__((noreturn, used, regparm(3)));
static ccbuff bt_translate_frag(compiled_frag *cfrag, decode_frag *frag);

/*
Expand Down
17 changes: 9 additions & 8 deletions bt_helper.S
Expand Up @@ -17,10 +17,9 @@ _(bt_interrupt):
mov _(bt_stack_base), %esp
movl %ebp, %eax
call _(bt_process_interrupt)
subl $4, %esp
pushl $0
pushl $0
pushl %ebp
xorl %edx, %edx
xorl %ecx, %ecx
movl %ebp, %eax
call _(bt_translate_and_run)

_(bt_continue):
Expand All @@ -44,14 +43,16 @@ miss:
pushl $0
_(bt_continue_chain):
mov %eax, 128(%ebp)
pushl $1
pushl %ebp
popl %ecx
movl $1, %edx
movl %ebp, %eax
call _(bt_translate_and_run)

_(bt_continue_ic):
mov %eax, 128(%ebp)
pushl $0
pushl %ebp
popl %ecx
xorl %edx, %edx
movl %ebp, %eax
call _(bt_translate_and_run)

_(bt_enter):
Expand Down

0 comments on commit d8087c1

Please sign in to comment.