@@ -902,10 +902,6 @@ void CodeGen::instGen_Set_Reg_To_Imm(emitAttr size,
902902 assert (genIsValidIntReg (reg));
903903 if (EA_IS_RELOC (size))
904904 {
905- if (!compiler->opts .compReloc )
906- {
907- size = EA_SIZE (size); // Strip any Reloc flags from size if we aren't doing relocs.
908- }
909905 emit->emitIns_R_AI (INS_addi, size, reg, imm);
910906 }
911907 else
@@ -2426,6 +2422,11 @@ instruction CodeGen::genGetInsForOper(GenTree* treeNode)
24262422 break ;
24272423
24282424 default :
2425+
2426+ char message[256 ];
2427+ _snprintf_s (message, ArrLen (message), _TRUNCATE, " Unhandled oper in genGetInsForOper() - float: %s" ,
2428+ GenTree::OpName (oper));
2429+ NYIRAW (message);
24292430 NO_WAY (" Unhandled oper in genGetInsForOper() - float" );
24302431 break ;
24312432 }
@@ -2743,8 +2744,7 @@ void CodeGen::genCodeForReturnTrap(GenTreeOp* tree)
27432744 params.callType = EC_INDIR_R;
27442745 params.ireg = REG_DEFAULT_HELPER_CALL_TARGET;
27452746
2746- emitAttr attr = compiler->opts .compReloc ? EA_PTR_DSP_RELOC : EA_PTRSIZE;
2747- GetEmitter ()->emitIns_R_AI (INS_ld, attr, params.ireg , (ssize_t )helperFunction.addr );
2747+ GetEmitter ()->emitIns_R_AI (INS_ld, EA_PTR_DSP_RELOC, params.ireg , (ssize_t )helperFunction.addr );
27482748 regSet.verifyRegUsed (params.ireg );
27492749 }
27502750
@@ -3615,8 +3615,7 @@ void CodeGen::genEmitHelperCall(unsigned helper, int argSize, emitAttr retSize,
36153615 // assert that all registers in callTargetMask are in the callKillSet
36163616 noway_assert ((callTargetMask & killSet) == callTargetMask);
36173617
3618- emitAttr attr = compiler->opts .compReloc ? EA_PTR_DSP_RELOC : EA_PTRSIZE;
3619- GetEmitter ()->emitIns_R_AI (INS_ld, attr, callTargetReg, (ssize_t )pAddr);
3618+ GetEmitter ()->emitIns_R_AI (INS_ld, EA_PTR_DSP_RELOC, callTargetReg, (ssize_t )pAddr);
36203619 regSet.verifyRegUsed (callTargetReg);
36213620
36223621 params.callType = EC_INDIR_R;
@@ -4420,8 +4419,7 @@ void CodeGen::genSetGSSecurityCookie(regNumber initReg, bool* pInitRegZeroed)
44204419 }
44214420 else
44224421 {
4423- emitAttr attr = compiler->opts .compReloc ? EA_PTR_DSP_RELOC : EA_PTRSIZE;
4424- emit->emitIns_R_AI (INS_ld, attr, initReg, (ssize_t )compiler->gsGlobalSecurityCookieAddr );
4422+ emit->emitIns_R_AI (INS_ld, EA_PTR_DSP_RELOC, initReg, (ssize_t )compiler->gsGlobalSecurityCookieAddr );
44254423
44264424 regSet.verifyRegUsed (initReg);
44274425 emit->emitIns_S_R (INS_sd, EA_PTRSIZE, initReg, compiler->lvaGSSecurityCookie , 0 );
@@ -4456,8 +4454,7 @@ void CodeGen::genEmitGSCookieCheck(bool pushReg)
44564454 else
44574455 {
44584456 // AOT case - GS cookie constant needs to be accessed through an indirection.
4459- emitAttr attr = compiler->opts .compReloc ? EA_PTR_DSP_RELOC : EA_PTRSIZE;
4460- GetEmitter ()->emitIns_R_AI (INS_ld, attr, regGSConst, (ssize_t )compiler->gsGlobalSecurityCookieAddr );
4457+ GetEmitter ()->emitIns_R_AI (INS_ld, EA_PTR_DSP_RELOC, regGSConst, (ssize_t )compiler->gsGlobalSecurityCookieAddr );
44614458 regSet.verifyRegUsed (regGSConst);
44624459 }
44634460 // Load this method's GS value from the stack frame
@@ -6481,8 +6478,7 @@ void CodeGen::genJumpToThrowHlpBlk_la(
64816478 // TODO-RISCV64-RVC: Remove hardcoded branch offset here
64826479 ssize_t imm = (3 + 1 ) << 2 ;
64836480 emit->emitIns_R_R_I (ins, EA_PTRSIZE, reg1, reg2, imm);
6484- emitAttr attr = compiler->opts .compReloc ? EA_PTR_DSP_RELOC : EA_PTRSIZE;
6485- emit->emitIns_R_AI (INS_ld, attr, params.ireg , (ssize_t )pAddr);
6481+ emit->emitIns_R_AI (INS_ld, EA_PTR_DSP_RELOC, params.ireg , (ssize_t )pAddr);
64866482 regSet.verifyRegUsed (params.ireg );
64876483 }
64886484
0 commit comments