[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#327351: gcc-4.0: Gcc miscompiles libc on hppa - breaks rounding



"Wesley W. Terpstra" <wesley@terpstra.ca> writes:

> On Sep 9, 2005, at 3:46 PM, Falk Hueffner wrote:

> I don't know it either, but what you propose doesn't compile.
> It complains about invalid argument when the 0() is removed.

OK, it seems these instructions actually don't like nonzero offsets. 

> So, this appears to work (compile and give proper results):
>
>   __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
>   sw[0] &= ~FE_DOWNWARD;
>   sw[0] |= round;
>   __asm__ ("fldd 0(%1), %%fr0" :: "m" (*sw), "r" (sw));
>
> Is this doing the right thing now?

Actually, I just noticed that sw[1] is probably also accessed. So
you'd add it too. Then it should work.

-- 
	Falk



Reply to: