From 0df01fd3d71481b5cc7aeea6a741b9fc3be15178 Mon Sep 17 00:00:00 2001 From: Thomas Chou Date: Fri, 21 May 2010 11:08:03 +0800 Subject: nios2: fix r15 issue for gcc4 The "-ffixed-r15" option doesn't work well for gcc4. Since we don't use gp for small data with option "-G0", we can use gp as global data pointer. This allows compiler to use r15. It is necessary for gcc4 to work properly. Signed-off-by: Thomas Chou Signed-off-by: Scott McNutt --- README | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'README') diff --git a/README b/README index 81692c0..acb3308 100644 --- a/README +++ b/README @@ -4023,6 +4023,14 @@ On ARM, the following registers are used: ==> U-Boot will use R8 to hold a pointer to the global data +On Nios II, the ABI is documented here: + http://www.altera.com/literature/hb/nios2/n2cpu_nii51016.pdf + + ==> U-Boot will use gp to hold a pointer to the global data + + Note: on Nios II, we give "-G0" option to gcc and don't use gp + to access small data sections, so gp is free. + NOTE: DECLARE_GLOBAL_DATA_PTR must be used with file-global scope, or current versions of GCC may "optimize" the code too much. -- cgit v1.1