more problems with type conversions (#21135)

This commit is contained in:
Walter Bright 2025-04-02 00:30:55 -07:00 committed by GitHub
parent 0b3975f265
commit d7dce783a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -343,7 +343,7 @@ void prolog_saveregs(ref CGstate cg, ref CodeBuilder cdb, regm_t topush, int cfa
{
printf("prolog_saveregs() topush: %s pushoffuse: %d\n", regm_str(topush), cg.pushoffuse);
assert(!(topush & ~fregsaved));
assert(cg.pushoffuse);
assert(cg.pushoffuse || !topush);
// Save to preallocated section in the stack frame
int xmmtopush = 0;
@ -393,7 +393,7 @@ private void epilog_restoreregs(ref CGstate cg, ref CodeBuilder cdb, regm_t topo
{
assert(cg.AArch64);
assert(cg.pushoffuse);
assert(cg.pushoffuse || !topop);
// Save to preallocated section in the stack frame
int xmmtopop = popcnt(topop & XMMREGS); // XMM regs take 16 bytes

View file

@ -1511,7 +1511,7 @@ void cdshtlng(ref CGstate cg, ref CodeBuilder cdb,elem* e,ref regm_t pretregs)
// EA: LDR w0,[sp,#8]
// reg: MOV w0,w1
code cs;
getlvalue(cdb,cs,e,0,RM.load);
getlvalue(cdb,cs,e1,0,RM.load);
cs.Sextend = (cs.Sextend & 0x100) | Extend.LSL;
reg = allocreg(cdb,retregs,TYint);
loadFromEA(cs,reg,4,4);