Commit 79cbf1a1 authored by Kenneth W. Chen's avatar Kenneth W. Chen Committed by David Mosberger

[PATCH] ia64: Clean up needlessly large stack frames in PAL-call stubs

The code allocated all 96 stacked registers, for no apparent reason.

Also, fix ia64_pal_call_static() to switch RSE to enforced-lazy, LE
mode before the PAL-call.
Signed-off-by: default avatarDavid Mosberger <davidm@hpl.hp.com>
parent 911aa5ff
...@@ -55,7 +55,7 @@ END(ia64_pal_default_handler) ...@@ -55,7 +55,7 @@ END(ia64_pal_default_handler)
*/ */
GLOBAL_ENTRY(ia64_pal_call_static) GLOBAL_ENTRY(ia64_pal_call_static)
.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(6) .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(6)
alloc loc1 = ar.pfs,6,90,0,0 alloc loc1 = ar.pfs,5,5,0,0
movl loc2 = pal_entry_point movl loc2 = pal_entry_point
1: { 1: {
mov r28 = in0 mov r28 = in0
...@@ -66,7 +66,9 @@ GLOBAL_ENTRY(ia64_pal_call_static) ...@@ -66,7 +66,9 @@ GLOBAL_ENTRY(ia64_pal_call_static)
ld8 loc2 = [loc2] // loc2 <- entry point ld8 loc2 = [loc2] // loc2 <- entry point
tbit.nz p6,p7 = in4, 0 tbit.nz p6,p7 = in4, 0
adds r8 = 1f-1b,r8 adds r8 = 1f-1b,r8
mov loc4=ar.rsc // save RSE configuration
;; ;;
mov ar.rsc=0 // put RSE in enforced lazy, LE mode
mov loc3 = psr mov loc3 = psr
mov loc0 = rp mov loc0 = rp
.body .body
...@@ -82,6 +84,7 @@ GLOBAL_ENTRY(ia64_pal_call_static) ...@@ -82,6 +84,7 @@ GLOBAL_ENTRY(ia64_pal_call_static)
mov rp = r8 mov rp = r8
br.cond.sptk.many b7 br.cond.sptk.many b7
1: mov psr.l = loc3 1: mov psr.l = loc3
mov ar.rsc = loc4 // restore RSE configuration
mov ar.pfs = loc1 mov ar.pfs = loc1
mov rp = loc0 mov rp = loc0
;; ;;
...@@ -98,7 +101,7 @@ END(ia64_pal_call_static) ...@@ -98,7 +101,7 @@ END(ia64_pal_call_static)
*/ */
GLOBAL_ENTRY(ia64_pal_call_stacked) GLOBAL_ENTRY(ia64_pal_call_stacked)
.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(5) .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(5)
alloc loc1 = ar.pfs,5,4,87,0 alloc loc1 = ar.pfs,4,4,4,0
movl loc2 = pal_entry_point movl loc2 = pal_entry_point
mov r28 = in0 // Index MUST be copied to r28 mov r28 = in0 // Index MUST be copied to r28
...@@ -145,7 +148,7 @@ END(ia64_pal_call_stacked) ...@@ -145,7 +148,7 @@ END(ia64_pal_call_stacked)
GLOBAL_ENTRY(ia64_pal_call_phys_static) GLOBAL_ENTRY(ia64_pal_call_phys_static)
.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(6) .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(6)
alloc loc1 = ar.pfs,6,90,0,0 alloc loc1 = ar.pfs,4,7,0,0
movl loc2 = pal_entry_point movl loc2 = pal_entry_point
1: { 1: {
mov r28 = in0 // copy procedure index mov r28 = in0 // copy procedure index
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment