Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Establish Stack Frame insider CallEHFunclet
Browse files Browse the repository at this point in the history
This commit revises the implementation of CallEHFunclet to establish
stack frame appropriately.

This commit allows libunwind to work correctly for the frame created by
CallEHFunclet.

This revises the PR suggested by #4581, which fixes #4579

Edited-by: MyungJoo Ham <myungjoo.ham@samsung.com>
parjong authored and myungjoo committed May 3, 2016
1 parent 7ee1d1b commit 6019ca3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/vm/arm/ehhelpers.S
Original file line number Diff line number Diff line change
@@ -47,6 +47,8 @@ OFFSET_OF_FRAME=(4 + SIZEOF__GSCookie)
//
// Runtime check for 8-byte alignment.
PROLOG_STACK_SAVE r7
// We lose stack unwindability here by configuring fp(r7) incorrectely
// here.
and r0, r7, #4
sub sp, sp, r0

@@ -99,6 +101,7 @@ OFFSET_OF_FRAME=(4 + SIZEOF__GSCookie)
NESTED_ENTRY CallEHFunclet, _TEXT, NoHandler

PROLOG_PUSH "{r4-r11, lr}"
PROLOG_STACK_SAVE_OFFSET r7, #12
alloc_stack 4

// On entry:
@@ -124,7 +127,8 @@ OFFSET_OF_FRAME=(4 + SIZEOF__GSCookie)
// frame pointer for accessing the locals in the parent method.
NESTED_ENTRY CallEHFilterFunclet, _TEXT, NoHandler

PROLOG_PUSH "{lr}"
PROLOG_PUSH "{r7, lr}"
PROLOG_STACK_SAVE r7
alloc_stack 4

// On entry:
@@ -140,6 +144,6 @@ OFFSET_OF_FRAME=(4 + SIZEOF__GSCookie)
blx r2

free_stack 4
EPILOG_POP "{pc}"
EPILOG_POP "{r7, pc}"

NESTED_END CallEHFilterFunclet, _TEXT

0 comments on commit 6019ca3

Please sign in to comment.