mirror of
https://github.com/golang/go
synced 2024-11-22 01:54:42 -07:00
5a, 5l, math: Add support for ABSD, ABSF floating point instructions.
R=golang-dev, dave, rsc, minux.ma CC=golang-dev https://golang.org/cl/6225051
This commit is contained in:
parent
823962c521
commit
dee5adcf74
@ -329,8 +329,6 @@ struct
|
||||
"STREXD", LTYPE9, ASTREXD,
|
||||
|
||||
/*
|
||||
"ABSF", LTYPEI, AABSF,
|
||||
"ABSD", LTYPEI, AABSD,
|
||||
"NEGF", LTYPEI, ANEGF,
|
||||
"NEGD", LTYPEI, ANEGD,
|
||||
"SQTF", LTYPEI, ASQTF,
|
||||
@ -343,6 +341,8 @@ struct
|
||||
"NRMD", LTYPEI, ANRMD,
|
||||
*/
|
||||
|
||||
"ABSF", LTYPEI, AABSF,
|
||||
"ABSD", LTYPEI, AABSD,
|
||||
"SQRTF", LTYPEI, ASQRTF,
|
||||
"SQRTD", LTYPEI, ASQRTD,
|
||||
"CMPF", LTYPEL, ACMPF,
|
||||
|
@ -126,6 +126,8 @@ enum as
|
||||
ADIVD,
|
||||
ASQRTF,
|
||||
ASQRTD,
|
||||
AABSF,
|
||||
AABSD,
|
||||
|
||||
ASRL,
|
||||
ASRA,
|
||||
|
@ -1493,7 +1493,7 @@ if(debug['G']) print("%ux: %s: arm %d\n", (uint32)(p->pc), p->from.sym->name, p-
|
||||
r = p->reg;
|
||||
if(r == NREG) {
|
||||
r = rt;
|
||||
if(p->as == AMOVF || p->as == AMOVD || p->as == ASQRTF || p->as == ASQRTD)
|
||||
if(p->as == AMOVF || p->as == AMOVD || p->as == ASQRTF || p->as == ASQRTD || p->as == AABSF || p->as == AABSD)
|
||||
r = 0;
|
||||
}
|
||||
o1 |= rf | (r<<16) | (rt<<12);
|
||||
@ -1948,6 +1948,8 @@ oprrr(int a, int sc)
|
||||
case ADIVF: return o | (0xe<<24) | (0x8<<20) | (0xa<<8) | (0<<4);
|
||||
case ASQRTD: return o | (0xe<<24) | (0xb<<20) | (1<<16) | (0xb<<8) | (0xc<<4);
|
||||
case ASQRTF: return o | (0xe<<24) | (0xb<<20) | (1<<16) | (0xa<<8) | (0xc<<4);
|
||||
case AABSD: return o | (0xe<<24) | (0xb<<20) | (0<<16) | (0xb<<8) | (0xc<<4);
|
||||
case AABSF: return o | (0xe<<24) | (0xb<<20) | (0<<16) | (0xa<<8) | (0xc<<4);
|
||||
case ACMPD: return o | (0xe<<24) | (0xb<<20) | (4<<16) | (0xb<<8) | (0xc<<4);
|
||||
case ACMPF: return o | (0xe<<24) | (0xb<<20) | (4<<16) | (0xa<<8) | (0xc<<4);
|
||||
|
||||
|
@ -55,6 +55,8 @@ softfloat(void)
|
||||
case ADIVD:
|
||||
case ASQRTF:
|
||||
case ASQRTD:
|
||||
case AABSF:
|
||||
case AABSD:
|
||||
goto soft;
|
||||
|
||||
default:
|
||||
|
@ -819,6 +819,8 @@ buildop(void)
|
||||
oprange[ASQRTD] = oprange[r];
|
||||
oprange[AMOVFD] = oprange[r];
|
||||
oprange[AMOVDF] = oprange[r];
|
||||
oprange[AABSF] = oprange[r];
|
||||
oprange[AABSD] = oprange[r];
|
||||
break;
|
||||
|
||||
case ACMPF:
|
||||
|
@ -420,6 +420,23 @@ stage3: // regd, regm are 4bit variables
|
||||
regd, regm, m->freghi[regd], m->freglo[regd]);
|
||||
break;
|
||||
|
||||
case 0xeeb00bc0: // D[regd] = abs D[regm]
|
||||
m->freglo[regd] = m->freglo[regm];
|
||||
m->freghi[regd] = m->freghi[regm] & ((1<<31)-1);
|
||||
|
||||
if(trace)
|
||||
runtime·printf("*** D[%d] = abs D[%d] %x-%x\n",
|
||||
regd, regm, m->freghi[regd], m->freglo[regd]);
|
||||
break;
|
||||
|
||||
case 0xeeb00ac0: // F[regd] = abs F[regm]
|
||||
m->freglo[regd] = m->freglo[regm] & ((1<<31)-1);
|
||||
|
||||
if(trace)
|
||||
runtime·printf("*** F[%d] = abs F[%d] %x\n",
|
||||
regd, regm, m->freglo[regd]);
|
||||
break;
|
||||
|
||||
case 0xeeb40bc0: // D[regd] :: D[regm] (CMPD)
|
||||
runtime·fcmp64c(getd(regd), getd(regm), &cmp, &nan);
|
||||
m->fflag = fstatus(nan, cmp);
|
||||
|
Loading…
Reference in New Issue
Block a user