summaryrefslogtreecommitdiff
path: root/gcc/config/nds32
diff options
context:
space:
mode:
authorjasonwucj <jasonwucj@138bc75d-0d04-0410-961f-82ee72b054a4>2014-09-03 09:44:49 +0000
committerjasonwucj <jasonwucj@138bc75d-0d04-0410-961f-82ee72b054a4>2014-09-03 09:44:49 +0000
commitbc44b8abf961a12fb124528ec0192975754e85ed (patch)
tree4f15f075b3f2f4ae828d408b82e2152870da9354 /gcc/config/nds32
parenteee9efd973eb8febecbf157412515fd9109ab772 (diff)
downloadgcc-bc44b8abf961a12fb124528ec0192975754e85ed.tar.gz
[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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214863 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/nds32')
-rw-r--r--gcc/config/nds32/nds32.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/config/nds32/nds32.h b/gcc/config/nds32/nds32.h
index 3f4c3ae3d5c..d3336b6be13 100644
--- a/gcc/config/nds32/nds32.h
+++ b/gcc/config/nds32/nds32.h
@@ -671,7 +671,8 @@ enum reg_class
#define STACK_POINTER_OFFSET 0
-#define FIRST_PARM_OFFSET(fundecl) 0
+#define FIRST_PARM_OFFSET(fundecl) \
+ (NDS32_DOUBLE_WORD_ALIGN_P (crtl->args.pretend_args_size) ? 0 : 4)
#define RETURN_ADDR_RTX(count, frameaddr) \
nds32_return_addr_rtx (count, frameaddr)