mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 09:18:42 +09:00
Issue #3049 - loongarch64: fill scalar macroassembler NYI helpers
This commit is contained in:
parent
6bb198c50d
commit
325e7c26d8
2 changed files with 28 additions and 6 deletions
|
|
@ -973,8 +973,17 @@ void MacroAssembler::branchAdd32(Condition cond, T src, Register dest,
|
|||
case CarrySet:
|
||||
ma_add32TestCarry(cond, dest, dest, src, overflow);
|
||||
break;
|
||||
case Equal:
|
||||
case NotEqual:
|
||||
case Zero:
|
||||
case NonZero:
|
||||
case Signed:
|
||||
case NotSigned:
|
||||
add32(src, dest);
|
||||
ma_b(dest, Imm32(0), overflow, cond);
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("NYI");
|
||||
MOZ_CRASH("Unexpected branchAdd32 condition");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -986,15 +995,28 @@ void MacroAssembler::branchSub32(Condition cond, T src, Register dest,
|
|||
case Overflow:
|
||||
ma_sub32TestOverflow(dest, dest, src, overflow);
|
||||
break;
|
||||
case CarrySet:
|
||||
case CarryClear: {
|
||||
ScratchRegisterScope scratch(asMasm());
|
||||
SecondScratchRegisterScope scratch2(asMasm());
|
||||
Register negSrc = dest == scratch ? Register(scratch2) : Register(scratch);
|
||||
ma_sub_w(negSrc, zero, src);
|
||||
// a - b borrows iff a + (-b) does not carry.
|
||||
ma_add32TestCarry(cond == CarrySet ? CarryClear : CarrySet, dest, dest,
|
||||
negSrc, overflow);
|
||||
break;
|
||||
}
|
||||
case Equal:
|
||||
case NotEqual:
|
||||
case NonZero:
|
||||
case Zero:
|
||||
case Signed:
|
||||
case NotSigned:
|
||||
ma_sub_w(dest, dest, src);
|
||||
ma_b(dest, dest, overflow, cond);
|
||||
sub32(src, dest);
|
||||
ma_b(dest, Imm32(0), overflow, cond);
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("NYI");
|
||||
MOZ_CRASH("Unexpected branchSub32 condition");
|
||||
}
|
||||
}
|
||||
void MacroAssembler::decBranchPtr(Condition cond, Register lhs, Imm32 rhs,
|
||||
|
|
|
|||
|
|
@ -702,8 +702,8 @@ class MacroAssemblerLOONGARCH64Compat : public MacroAssemblerLOONGARCH64 {
|
|||
mov(ImmWord(uintptr_t(imm.value)), dest);
|
||||
}
|
||||
void mov(CodeLabel* label, Register dest) { ma_li(dest, label); }
|
||||
void mov(Register src, Address dest) { MOZ_CRASH("NYI-IC"); }
|
||||
void mov(Address src, Register dest) { MOZ_CRASH("NYI-IC"); }
|
||||
void mov(Register src, Address dest) { storePtr(src, dest); }
|
||||
void mov(Address src, Register dest) { loadPtr(src, dest); }
|
||||
|
||||
void writeDataRelocation(const Value& val) {
|
||||
// Raw GC pointer relocations and Value relocations both end up in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue