@@ -3368,7 +3368,7 @@ void prolog_16bit_windows_farfunc(ref CodeBuilder cdb, tym_t* tyf, bool* pushds)
3368
3368
{
3369
3369
cdb.gen1(0x1E ); // PUSH DS
3370
3370
* pushds = true ;
3371
- BPoff = - REGSIZE ;
3371
+ cgstate. BPoff = - REGSIZE ;
3372
3372
}
3373
3373
if (wflags & (WFds | WFss | WFdgroup))
3374
3374
cdb.gen2(0x8E ,modregrm(3 ,3 ,AX )); // MOV DS,AX
@@ -3570,8 +3570,8 @@ void prolog_setupalloca(ref CodeBuilder cdb)
3570
3570
// Set up magic parameter for alloca()
3571
3571
// MOV -REGSIZE[BP],localsize - BPoff
3572
3572
cdb.genc(0xC7 ,modregrm(2 ,0 ,BPRM ),
3573
- FLconst,cgstate.Alloca.offset + BPoff,
3574
- FLconst,localsize - BPoff);
3573
+ FLconst,cgstate.Alloca.offset + cgstate. BPoff,
3574
+ FLconst,localsize - cgstate. BPoff);
3575
3575
if (I64 )
3576
3576
code_orrex(cdb.last(), REX_W );
3577
3577
}
@@ -3596,7 +3596,7 @@ void prolog_saveregs(ref CodeBuilder cdb, regm_t topush, int cfa_offset)
3596
3596
// Save to preallocated section in the stack frame
3597
3597
int xmmtopush = popcnt(topush & XMMREGS ); // XMM regs take 16 bytes
3598
3598
int gptopush = popcnt(topush) - xmmtopush; // general purpose registers to save
3599
- targ_size_t xmmoffset = cgstate.pushoff + BPoff;
3599
+ targ_size_t xmmoffset = cgstate.pushoff + cgstate. BPoff;
3600
3600
if (! cgstate.hasframe || cgstate.enforcealign)
3601
3601
xmmoffset += EBPtoESP;
3602
3602
targ_size_t gpoffset = xmmoffset + xmmtopush * 16 ;
@@ -3699,7 +3699,7 @@ private void epilog_restoreregs(ref CodeBuilder cdb, regm_t topop)
3699
3699
// Save to preallocated section in the stack frame
3700
3700
int xmmtopop = popcnt(topop & XMMREGS ); // XMM regs take 16 bytes
3701
3701
int gptopop = popcnt(topop) - xmmtopop; // general purpose registers to save
3702
- targ_size_t xmmoffset = cgstate.pushoff + BPoff;
3702
+ targ_size_t xmmoffset = cgstate.pushoff + cgstate. BPoff;
3703
3703
if (! cgstate.hasframe || cgstate.enforcealign)
3704
3704
xmmoffset += EBPtoESP;
3705
3705
targ_size_t gpoffset = xmmoffset + xmmtopop * 16 ;
@@ -3819,7 +3819,7 @@ void prolog_genvarargs(ref CodeBuilder cdb, Symbol* sv)
3819
3819
3820
3820
/* Save registers into the voff area on the stack
3821
3821
*/
3822
- targ_size_t voff = cgstate.Auto.size + BPoff + sv.Soffset; // EBP offset of start of sv
3822
+ targ_size_t voff = cgstate.Auto.size + cgstate. BPoff + sv.Soffset; // EBP offset of start of sv
3823
3823
const int vregnum = 6 ;
3824
3824
const uint vsize = vregnum * 8 + 8 * 16 ;
3825
3825
@@ -4076,7 +4076,7 @@ void prolog_loadparams(ref CodeBuilder cdb, tym_t tyf, bool pushalloc)
4076
4076
continue ;
4077
4077
}
4078
4078
4079
- targ_size_t offset = cgstate.Fast.size + BPoff;
4079
+ targ_size_t offset = cgstate.Fast.size + cgstate. BPoff;
4080
4080
if (s.Sclass == SC .shadowreg)
4081
4081
offset = cgstate.Para.size;
4082
4082
offset += s.Soffset;
@@ -4109,7 +4109,7 @@ void prolog_loadparams(ref CodeBuilder cdb, tym_t tyf, bool pushalloc)
4109
4109
else
4110
4110
{
4111
4111
// printf("%s Fast.size = %d, BPoff = %d, Soffset = %d, sz = %d\n",
4112
- // s.Sident, (int)cgstate.Fast.size, (int)BPoff, (int)s.Soffset, (int)sz);
4112
+ // s.Sident, (int)cgstate.Fast.size, (int)cgstate. BPoff, (int)s.Soffset, (int)sz);
4113
4113
if (I64 && sz > 4 )
4114
4114
code_orrex(cdb.last(), REX_W );
4115
4115
}
@@ -5093,18 +5093,18 @@ void cod3_adjSymOffsets()
5093
5093
break ;
5094
5094
5095
5095
case SC .fastpar:
5096
- // printf("\tfastpar %s %p Soffset %x Fast.size %x BPoff %x\n", s.Sident, s, cast(int)s.Soffset, cast(int)cgstate.Fast.size, cast(int)BPoff);
5097
- s.Soffset += cgstate.Fast.size + BPoff;
5096
+ // printf("\tfastpar %s %p Soffset %x Fast.size %x BPoff %x\n", s.Sident, s, cast(int)s.Soffset, cast(int)cgstate.Fast.size, cast(int)cgstate. BPoff);
5097
+ s.Soffset += cgstate.Fast.size + cgstate. BPoff;
5098
5098
break ;
5099
5099
5100
5100
case SC .auto_:
5101
5101
case SC .register:
5102
5102
if (s.Sfl == FLfast)
5103
- s.Soffset += cgstate.Fast.size + BPoff;
5103
+ s.Soffset += cgstate.Fast.size + cgstate. BPoff;
5104
5104
else
5105
- // printf("s = '%s', Soffset = x%x, Auto.size = x%x, BPoff = x%x EBPtoESP = x%x\n", s.Sident, cast(int)s.Soffset, cast(int)cgstate.Auto.size, cast(int)BPoff, cast(int)EBPtoESP);
5105
+ // printf("s = '%s', Soffset = x%x, Auto.size = x%x, BPoff = x%x EBPtoESP = x%x\n", s.Sident, cast(int)s.Soffset, cast(int)cgstate.Auto.size, cast(int)cgstate. BPoff, cast(int)EBPtoESP);
5106
5106
// if (!(funcsym_p.Sfunc.Fflags3 & Fnested))
5107
- s.Soffset += cgstate.Auto.size + BPoff;
5107
+ s.Soffset += cgstate.Auto.size + cgstate. BPoff;
5108
5108
break ;
5109
5109
5110
5110
case SC .bprel:
@@ -5333,7 +5333,7 @@ void assignaddrc(code *c)
5333
5333
goto do2;
5334
5334
}
5335
5335
else
5336
- { c.IEV1 .Vpointer += s.Soffset + soff + BPoff;
5336
+ { c.IEV1 .Vpointer += s.Soffset + soff + cgstate. BPoff;
5337
5337
if (s.Sflags & SFLunambig)
5338
5338
c.Iflags |= CFunambig;
5339
5339
L2 :
@@ -5361,22 +5361,22 @@ void assignaddrc(code *c)
5361
5361
5362
5362
case FLpara:
5363
5363
// printf("s = %s, Soffset = %d, Para.size = %d, BPoff = %d, EBPtoESP = %d, Vpointer = %d\n",
5364
- // s.Sident.ptr, cast(int)s.Soffset, cast(int)Para.size, cast(int)BPoff,
5364
+ // s.Sident.ptr, cast(int)s.Soffset, cast(int)Para.size, cast(int)cgstate. BPoff,
5365
5365
// cast(int)EBPtoESP, cast(int)c.IEV1.Vpointer);
5366
- soff = cgstate.Para.size - BPoff; // cancel out add of BPoff
5366
+ soff = cgstate.Para.size - cgstate. BPoff; // cancel out add of BPoff
5367
5367
goto L1 ;
5368
5368
5369
5369
case FLfltreg:
5370
- c.IEV1 .Vpointer += cgstate.Foff + BPoff;
5370
+ c.IEV1 .Vpointer += cgstate.Foff + cgstate. BPoff;
5371
5371
c.Iflags |= CFunambig;
5372
5372
goto L2 ;
5373
5373
5374
5374
case FLallocatmp:
5375
- c.IEV1 .Vpointer += cgstate.Alloca.offset + BPoff;
5375
+ c.IEV1 .Vpointer += cgstate.Alloca.offset + cgstate. BPoff;
5376
5376
goto L2 ;
5377
5377
5378
5378
case FLfuncarg:
5379
- c.IEV1 .Vpointer += cgstate.funcarg.offset + BPoff;
5379
+ c.IEV1 .Vpointer += cgstate.funcarg.offset + cgstate. BPoff;
5380
5380
goto L2 ;
5381
5381
5382
5382
case FLbprel:
@@ -5390,19 +5390,19 @@ void assignaddrc(code *c)
5390
5390
c.Iop = NOP ;
5391
5391
continue ;
5392
5392
}
5393
- c.IEV1 .Vpointer = CSE .offset(sn) + cgstate.CSoff + BPoff;
5393
+ c.IEV1 .Vpointer = CSE .offset(sn) + cgstate.CSoff + cgstate. BPoff;
5394
5394
c.Iflags |= CFunambig;
5395
5395
goto L2 ;
5396
5396
5397
5397
case FLregsave:
5398
5398
sn = c.IEV1 .Vuns;
5399
- c.IEV1 .Vpointer = sn + regsave.off + BPoff;
5399
+ c.IEV1 .Vpointer = sn + regsave.off + cgstate. BPoff;
5400
5400
c.Iflags |= CFunambig;
5401
5401
goto L2 ;
5402
5402
5403
5403
case FLndp:
5404
5404
assert (c.IEV1 .Vuns < global87.save.length);
5405
- c.IEV1 .Vpointer = c.IEV1 .Vuns * tysize(TYldouble) + cgstate.NDPoff + BPoff;
5405
+ c.IEV1 .Vpointer = c.IEV1 .Vuns * tysize(TYldouble) + cgstate.NDPoff + cgstate. BPoff;
5406
5406
c.Iflags |= CFunambig;
5407
5407
goto L2 ;
5408
5408
@@ -5478,11 +5478,11 @@ void assignaddrc(code *c)
5478
5478
/* NOTREACHED */
5479
5479
5480
5480
case FLfast:
5481
- c.IEV2 .Vpointer += s.Soffset + cgstate.Fast.size + BPoff;
5481
+ c.IEV2 .Vpointer += s.Soffset + cgstate.Fast.size + cgstate. BPoff;
5482
5482
break ;
5483
5483
5484
5484
case FLauto:
5485
- c.IEV2 .Vpointer += s.Soffset + cgstate.Auto.size + BPoff;
5485
+ c.IEV2 .Vpointer += s.Soffset + cgstate.Auto.size + cgstate. BPoff;
5486
5486
L3 :
5487
5487
if (! cgstate.hasframe || (cgstate.enforcealign && c.IFL2 != FLpara))
5488
5488
/* Convert to ESP relative address instead of EBP */
@@ -5494,15 +5494,15 @@ void assignaddrc(code *c)
5494
5494
goto L3 ;
5495
5495
5496
5496
case FLfltreg:
5497
- c.IEV2 .Vpointer += cgstate.Foff + BPoff;
5497
+ c.IEV2 .Vpointer += cgstate.Foff + cgstate. BPoff;
5498
5498
goto L3 ;
5499
5499
5500
5500
case FLallocatmp:
5501
- c.IEV2 .Vpointer += cgstate.Alloca.offset + BPoff;
5501
+ c.IEV2 .Vpointer += cgstate.Alloca.offset + cgstate. BPoff;
5502
5502
goto L3 ;
5503
5503
5504
5504
case FLfuncarg:
5505
- c.IEV2 .Vpointer += cgstate.funcarg.offset + BPoff;
5505
+ c.IEV2 .Vpointer += cgstate.funcarg.offset + cgstate. BPoff;
5506
5506
goto L3 ;
5507
5507
5508
5508
case FLbprel:
@@ -5552,11 +5552,11 @@ targ_size_t cod3_bpoffset(Symbol *s)
5552
5552
break ;
5553
5553
5554
5554
case FLfast:
5555
- offset += cgstate.Fast.size + BPoff;
5555
+ offset += cgstate.Fast.size + cgstate. BPoff;
5556
5556
break ;
5557
5557
5558
5558
case FLauto:
5559
- offset += cgstate.Auto.size + BPoff;
5559
+ offset += cgstate.Auto.size + cgstate. BPoff;
5560
5560
break ;
5561
5561
5562
5562
default :
0 commit comments