From 19510e5e18ac14bd9dc59eddb1a794ced7238301 Mon Sep 17 00:00:00 2001 From: tpnguyen Date: Fri, 27 Oct 2006 23:55:12 +0000 Subject: 2006-10-27 Thang Nguyen * runtime/regs.c: patch from Bibo Mao for fixing the return value on IA64 (bz #3404). --- runtime/ChangeLog | 5 +++++ runtime/regs.c | 14 +++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'runtime') diff --git a/runtime/ChangeLog b/runtime/ChangeLog index 5872fc44..079b02ee 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,8 @@ +2006-10-27 Thang Nguyen + + * runtime/regs.c: patch from Bibo Mao for fixing the return + value on IA64 (bz #3404). + 2006-10-24 Li Guanglei * runtime/lket/b2a/lket_b2a.[ch]: be sync with LKET hookid diff --git a/runtime/regs.c b/runtime/regs.c index 3684ad3d..6a879966 100644 --- a/runtime/regs.c +++ b/runtime/regs.c @@ -39,7 +39,9 @@ static long ia64_fetch_register(int regno, struct pt_regs *pt_regs) { struct ia64_stap_get_arbsp_param pa; - if (regno < 32 || regno > 127) + if (regno >= 8 && regno <= 11) + return *(unsigned long *)(&pt_regs->r8 + regno - 8); + else if (regno < 32 || regno > 127) return 0; pa.ip = pt_regs->cr_iip; @@ -56,8 +58,14 @@ static void ia64_store_register(int regno, { struct ia64_stap_get_arbsp_param pa; unsigned long rsc_save = 0; - - if (regno < 32 || regno > 127) + unsigned long *addr; + + if (regno >= 8 && regno <= 11) { + addr =&pt_regs->r8; + addr += regno - 8; + *(addr) = value; + } + else if (regno < 32 || regno > 127) return; pa.ip = pt_regs->cr_iip; -- cgit