Bug 27338

Summary: Violation of mips o64 ABI
Product: gcc Reporter: niva
Component: targetAssignee: Richard Sandiford <rsandifo>
Status: RESOLVED WONTFIX    
Severity: normal CC: gcc-bugs, sje
Priority: P3    
Version: 4.1.0   
Target Milestone: ---   
Host: i686-pc-linux-gnu Target: mips64-none-elf
Build: i686-pc-linux-gnu Known to work:
Known to fail: Last reconfirmed: 2006-05-19 15:10:28

Description niva 2006-04-27 13:11:38 UTC
According to http://gcc.gnu.org/projects/mipso64-abi.html
"if the first and second arguments floating-point arguments 
to a function are 32-bit values, they are passed in $f12 
and $f14". The assembler file obtained as a result of
compilation with mips64-none-elf-gcc-4.1.0 of the following 
file (o64.c), shows that a pair of "float" parameters is 
passed on $f12 and $f13 instead of $f12 and $f14.

When I compile the same file with mips64-none-elf-gcc-3.4.5,
I get assembler code where the parameters are passed on 
$f12 and $f14.


extern float g01f; 

int checkf (float x, float v) 
{ if (x != v + 90.0) 
  { return 1; } 
  else 
  { return 0; }
} 

void checkgf (void) { 
  checkf (g01f, 1);
}

void initf (float *p, float v) 
  { *p = v + 90.0; }
Comment 1 Richard Sandiford 2006-05-19 15:10:28 UTC
The use of $f14 was an unintentional historical accident,
not a deliberate decision.  It has since been "fixed".

I realise this isn't going to be very helpful to you,
but you should just treat 3.4 and 4.x as being
ABI-incompatible as far as o64 is concerned.

The web page should be updated; I'll assign myself
to this bug for that reason.

Richard
Comment 2 Steve Ellcey 2013-01-10 18:34:11 UTC
Richard, has the need for any documentation change been removed by the age of this defect?  Perhaps it should just be closed now.
Comment 3 Richard Sandiford 2013-01-14 19:25:36 UTC
Yeah, trh(In reply to comment #2)
> Richard, has the need for any documentation change been removed by the age of
> this defect?  Perhaps it should just be closed now.

Yeah, that would probably be best.  I hang my head in shame at how
long it's taken me to do nothing.