diff options
author | Chung-Ju Wu <jasonwucj@gmail.com> | 2014-09-03 09:44:49 +0000 |
---|---|---|
committer | Chung-Ju Wu <jasonwucj@gcc.gnu.org> | 2014-09-03 09:44:49 +0000 |
commit | 4f44e960ea3c175eb8ec92b6872b8a2ef6775dba (patch) | |
tree | 4f15f075b3f2f4ae828d408b82e2152870da9354 | |
parent | [NDS32] Prepare necessary varargs information in compute_stack_frame(). (diff) |
[NDS32] Since argument pointer must be 8-byte alignment...
[NDS32] Since argument pointer must be 8-byte alignment, our first parameter may
require 4-byte offset if pushed varargs is not 8-byte aligned.
* config/nds32/nds32.h (FIRST_PARM_OFFSET): Set proper location
according to the value of crtl->args.pretend_args_size.
From-SVN: r214863
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/nds32/nds32.h | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 31baaaddc4b1..90be64a084db 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog | |||
@@ -1,5 +1,10 @@ | |||
1 | 2014-09-03 Chung-Ju Wu <jasonwucj@gmail.com> | 1 | 2014-09-03 Chung-Ju Wu <jasonwucj@gmail.com> |
2 | 2 | ||
3 | * config/nds32/nds32.h (FIRST_PARM_OFFSET): Set proper location | ||
4 | according to the value of crtl->args.pretend_args_size. | ||
5 | |||
6 | 2014-09-03 Chung-Ju Wu <jasonwucj@gmail.com> | ||
7 | |||
3 | * config/nds32/nds32.c (nds32_compute_stack_frame): Prepare necessary | 8 | * config/nds32/nds32.c (nds32_compute_stack_frame): Prepare necessary |
4 | varargs information. | 9 | varargs information. |
5 | 10 | ||
diff --git a/gcc/config/nds32/nds32.h b/gcc/config/nds32/nds32.h index 3f4c3ae3d5ce..d3336b6be13e 100644 --- a/gcc/config/nds32/nds32.h +++ b/gcc/config/nds32/nds32.h | |||
@@ -671,7 +671,8 @@ enum reg_class | |||
671 | 671 | ||
672 | #define STACK_POINTER_OFFSET 0 | 672 | #define STACK_POINTER_OFFSET 0 |
673 | 673 | ||
674 | #define FIRST_PARM_OFFSET(fundecl) 0 | 674 | #define FIRST_PARM_OFFSET(fundecl) \ |
675 | (NDS32_DOUBLE_WORD_ALIGN_P (crtl->args.pretend_args_size) ? 0 : 4) | ||
675 | 676 | ||
676 | #define RETURN_ADDR_RTX(count, frameaddr) \ | 677 | #define RETURN_ADDR_RTX(count, frameaddr) \ |
677 | nds32_return_addr_rtx (count, frameaddr) | 678 | nds32_return_addr_rtx (count, frameaddr) |