MFamd64 (put TF_EIP in assym.s and use it instead of a magic offset in

FAKE_MCOUNT()s).
This commit is contained in:
Bruce Evans 2004-05-23 16:50:55 +00:00
parent a2c50ac453
commit 6670fdb155
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=129620
4 changed files with 8 additions and 7 deletions

View file

@ -77,7 +77,7 @@ IDTVEC(vec_name) ; \
movl %eax, %es ; \
movl $KPSEL, %eax ; /* reload with per-CPU data segment */ \
movl %eax, %fs ; \
FAKE_MCOUNT(13*4(%esp)) ; \
FAKE_MCOUNT(TF_EIP(%esp)) ; \
movl lapic, %edx ; /* pointer to local APIC */ \
movl LA_ISR + 16 * (index)(%edx), %eax ; /* load ISR */ \
bsrl %eax, %eax ; /* index of highset set bit in ISR */ \
@ -263,7 +263,7 @@ IDTVEC(statclock)
movl lapic, %edx
movl $0, LA_EOI(%edx) /* End Of Interrupt to APIC */
FAKE_MCOUNT(13*4(%esp))
FAKE_MCOUNT(TF_EIP(%esp))
pushl $0 /* XXX convert trapframe to clockframe */
call forwarded_statclock
@ -292,7 +292,7 @@ IDTVEC(cpuast)
movl lapic, %edx
movl $0, LA_EOI(%edx) /* End Of Interrupt to APIC */
FAKE_MCOUNT(13*4(%esp))
FAKE_MCOUNT(TF_EIP(%esp))
MEXITCOUNT
jmp doreti

View file

@ -134,7 +134,7 @@ alltraps_with_regs_pushed:
movl %eax,%es
movl $KPSEL,%eax
movl %eax,%fs
FAKE_MCOUNT(13*4(%esp))
FAKE_MCOUNT(TF_EIP(%esp))
calltrap:
FAKE_MCOUNT(btrap) /* init "from" btrap -> calltrap */
call trap
@ -172,7 +172,7 @@ IDTVEC(lcall_syscall)
movl %eax,%es
movl $KPSEL,%eax
movl %eax,%fs
FAKE_MCOUNT(13*4(%esp))
FAKE_MCOUNT(TF_EIP(%esp))
call syscall
MEXITCOUNT
jmp doreti
@ -197,7 +197,7 @@ IDTVEC(int0x80_syscall)
movl %eax,%es
movl $KPSEL,%eax
movl %eax,%fs
FAKE_MCOUNT(13*4(%esp))
FAKE_MCOUNT(TF_EIP(%esp))
call syscall
MEXITCOUNT
jmp doreti

View file

@ -148,6 +148,7 @@ ASSYM(PCB_VM86CALL, PCB_VM86CALL);
ASSYM(TF_TRAPNO, offsetof(struct trapframe, tf_trapno));
ASSYM(TF_ERR, offsetof(struct trapframe, tf_err));
ASSYM(TF_EIP, offsetof(struct trapframe, tf_eip));
ASSYM(TF_CS, offsetof(struct trapframe, tf_cs));
ASSYM(TF_EFLAGS, offsetof(struct trapframe, tf_eflags));
ASSYM(SIGF_HANDLER, offsetof(struct sigframe, sf_ahu.sf_handler));

View file

@ -59,7 +59,7 @@ IDTVEC(vec_name) ; \
movl $KPSEL, %eax ; /* reload with per-CPU data segment */ \
movl %eax, %fs ; \
; \
FAKE_MCOUNT(13*4(%esp)) ; \
FAKE_MCOUNT(TF_EIP(%esp)) ; \
pushl $irq_num; /* pass the IRQ */ \
call atpic_handle_intr ; \
addl $4, %esp ; /* discard the parameter */ \