mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
replace union eve with union Vconst
This commit is contained in:
parent
0466791297
commit
978cdca8b9
6 changed files with 13 additions and 13 deletions
|
@ -700,11 +700,11 @@ struct con_t
|
|||
import dmd.backend.bcomplex;
|
||||
|
||||
/*********************************
|
||||
* Union of all data types. Storage allocated must be the right
|
||||
* Union of all arithmetic data types. Storage allocated must be the right
|
||||
* size of the data on the TARGET, not the host.
|
||||
*/
|
||||
|
||||
union eve
|
||||
union Vconst
|
||||
{
|
||||
targ_char Vchar;
|
||||
targ_schar Vschar;
|
||||
|
|
|
@ -59,7 +59,7 @@ bool isXMMstore(opcode_t op)
|
|||
*/
|
||||
|
||||
@trusted
|
||||
void movxmmconst(ref CodeBuilder cdb, reg_t xreg, tym_t ty, eve* pev, regm_t flags)
|
||||
void movxmmconst(ref CodeBuilder cdb, reg_t xreg, tym_t ty, Vconst* pev, regm_t flags)
|
||||
{
|
||||
//printf("movxmmconst() %s ty: %s value: %lld\n", regm_str(mask(xreg)), tym_str(ty), pev.Vllong);
|
||||
|
||||
|
@ -187,7 +187,7 @@ void orthxmm(ref CodeBuilder cdb, elem *e, regm_t *pretregs)
|
|||
regm_t nretregs = XMMREGS & ~retregs;
|
||||
const sreg = allocreg(cdb,nretregs,e2.Ety); // hold sign bit
|
||||
const uint sz = tysize(e1.Ety);
|
||||
eve signbit;
|
||||
Vconst signbit;
|
||||
signbit.Vint = 0x80000000;
|
||||
if (sz == 8)
|
||||
signbit.Vllong = 0x8000_0000_0000_0000;
|
||||
|
@ -706,7 +706,7 @@ void xmmneg(ref CodeBuilder cdb,elem *e,regm_t *pretregs)
|
|||
regm_t rretregs = XMMREGS & ~retregs;
|
||||
const rreg = allocreg(cdb,rretregs,tyml);
|
||||
|
||||
eve signbit;
|
||||
Vconst signbit;
|
||||
signbit.Vint = 0x80000000;
|
||||
if (sz == 8)
|
||||
signbit.Vllong = 0x8000_0000_0000_0000;
|
||||
|
@ -747,7 +747,7 @@ void xmmabs(ref CodeBuilder cdb,elem *e,regm_t *pretregs)
|
|||
regm_t rretregs = XMMREGS & ~retregs;
|
||||
const rreg = allocreg(cdb,rretregs,tyml);
|
||||
|
||||
eve mask;
|
||||
Vconst mask;
|
||||
mask.Vint = 0x7FFF_FFFF;
|
||||
if (sz == 8)
|
||||
mask.Vllong = 0x7FFF_FFFF_FFFF_FFFFL;
|
||||
|
|
|
@ -78,7 +78,7 @@ struct elem
|
|||
|
||||
union
|
||||
{
|
||||
eve EV; // arithmetic constants
|
||||
Vconst EV; // arithmetic constants
|
||||
|
||||
struct
|
||||
{
|
||||
|
|
|
@ -1315,7 +1315,7 @@ elem *el_convfloat(elem *e)
|
|||
@trusted
|
||||
elem *el_convxmm(elem *e)
|
||||
{
|
||||
ubyte[eve.sizeof] buffer = void;
|
||||
ubyte[Vconst.sizeof] buffer = void;
|
||||
|
||||
// Do not convert if the constants can be loaded with the special XMM instructions
|
||||
if (loadxmmconst(e))
|
||||
|
@ -1558,7 +1558,7 @@ elem *el_convert(elem *e)
|
|||
*/
|
||||
|
||||
@safe
|
||||
elem * el_const(tym_t ty, ref eve pconst)
|
||||
elem * el_const(tym_t ty, ref Vconst pconst)
|
||||
{
|
||||
elem* e = el_calloc();
|
||||
e.Eoper = OPconst;
|
||||
|
@ -1659,7 +1659,7 @@ elem *el_ctor_dtor(elem *ec, elem *ed, out elem* pedtor)
|
|||
ector.Ety = TYvoid;
|
||||
// ector.ed.Edecl = decl;
|
||||
|
||||
eve c = void;
|
||||
Vconst c = void;
|
||||
memset(&c, 0, c.sizeof);
|
||||
elem *e_flag_0 = el_bin(OPeq, TYvoid, el_var(sflag), el_const(TYbool, c)); // __flag = 0
|
||||
er = el_bin(OPinfo, ec ? ec.Ety : TYvoid, ector, el_combine(e_flag_0, ec));
|
||||
|
@ -2720,7 +2720,7 @@ case_tym:
|
|||
case TYulong16: // uint[16]
|
||||
case TYllong8: // long[8]
|
||||
case TYullong8: // ulong[8]
|
||||
printf("512 bit vector "); // not supported yet with union eve
|
||||
printf("512 bit vector "); // not supported yet with union Vconst
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -345,7 +345,7 @@ static if (0)
|
|||
debug printf("d1 = %Lg, d2 = %Lg, op = %d, OPne = %d, tym = x%lx\n",d1,d2,op,OPne,tym);
|
||||
debug printf("tym1 = x%lx, tym2 = x%lx, e2 = %g\n",tym,tym2,e2.Vdouble);
|
||||
|
||||
eve u;
|
||||
Vconst u = void;
|
||||
debug printf("d1 = x%16llx\n", (u.Vldouble = d1, u.Vullong));
|
||||
debug printf("d2 = x%16llx\n", (u.Vldouble = d2, u.Vullong));
|
||||
}
|
||||
|
|
|
@ -1903,7 +1903,7 @@ private void appendelem(elem *n,elem **pn)
|
|||
@trusted
|
||||
private void newfamlist(famlist* fl, tym_t ty)
|
||||
{
|
||||
eve c = void;
|
||||
Vconst c = void;
|
||||
memset(&c,0,c.sizeof);
|
||||
|
||||
fl.FLty = ty;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue