------- Comment #1 from nemet at gcc dot gnu dot org 2009-02-03 18:36 ------- > Register $3 (v1) returns with uninitialized garbage. This is the high part of > the 64 bit return value. > > I am not sure what should happen here. Really the "d" asm constraint should > not match a 64 bit variable for the o32 ABI.
No, I think it should. You just need to use high-part and low-part operand codes to refer to the 32-bit parts: unsigned long long bar(unsigned long long l) { unsigned long long rv; asm volatile ("#fill %L0; #fill %M0" : "=d" (rv)); return rv; } #APP # 4 "s.c" 1 #fill $5; #fill $4 # 0 "" 2 #NO_APP move $2,$4 .set noreorder .set nomacro j $31 move $3,$5 .set macro .set reorder -- nemet at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nemet at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39090