This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH:[darwin] fix load of a misaligned double word

On Dec 28, 2003, at 13:22, Brad Lucier wrote:

Arggh. I should learn how to test things better.

I'm finding an instance where the the offset parameter error for double-word
loads comes up again:

gcc -I../include -I. -no-cpp-precomp -Wall -W -Wno-unused -O1 -fno-math-errno -fschedule-insns2 -fno-trapping-math -fno-strict-aliasing -fomit-frame-pointer -fPIC -fno-common -mcpu=G5 -DHAVE_CONFIG_H -D___PRIMAL -D___LIBRARY -D___GAMBCDIR=\"/usr/local/\" -c _kernel.c -save-temps
gcc: unrecognized option `-no-cpp-precomp'
In file included from os.h:151,
from _kernel.c:1482:
/usr/include/dlfcn.h:35:2: warning: #warning "You are using dlopen(), a legacy API. Please use the Mach-O dylib loading APIs if at all possible"
_kernel.c: In function `___H__20___kernel':
_kernel.c:13693: warning: implicit declaration of function `___os_device_tty_input_set'
_kernel.s:3490:Parameter error: expression must be a multiple of 4 (parameter 2)
_kernel.s:3491:Parameter error: expression must be a multiple of 4 (parameter 2)

Basically it is these two lines which are causing them:
*(double*)(((int)(((int*)((___r1)-(1)))+1))+(((((int)(8))<<2))<<(3 -2)))=(2*(1+2)<<2);
n = (1<<2) + 17 * sizeof (double) + (5<<2);
*(double*)(((int)(((int*)((___r1)-(1)))+1))+(((((int)(9))<<2))<<(3 -2)))=(2*n);

Basically it is GCC likes to use GPR for floating point.

Andrew Pinski

These files are at

The gcc version is

[dhcp10:~/programs/gambc40b4/lib] lucier% gcc -v
Reading specs from /pkgs/gcc-3.4/lib/gcc/powerpc-apple-darwin7.2.0/3.4.0/specs
Configured with: ../configure --prefix=/pkgs/gcc-3.4 --disable-checking
Thread model: posix
gcc version 3.4.0 20031227 (experimental)

which I believe has David's fix.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]