Commit 419eddda authored by Ilija Pavlovic's avatar Ilija Pavlovic Committed by Commit Bot

MIPS: Use macro-instructions in code-generator.

Port for: https://chromium-review.googlesource.com/c/v8/v8/+/608975

In code generator for MIPS32, certain instructions are substituted with
corresponding macro-instructions.

TEST=
BUG=

Change-Id: I2ac47a785f0ea14c448f727da124dc78ea6c81af
Reviewed-on: https://chromium-review.googlesource.com/699998Reviewed-by: 's avatarIvica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
Cr-Commit-Position: refs/heads/master@{#48278}
parent 51334bb8
This diff is collapsed.
......@@ -1861,7 +1861,7 @@ void TurboAssembler::Trunc_uw_s(FPURegister fd, FPURegister fs,
mtc1(t8, fd);
}
void MacroAssembler::Trunc_w_d(FPURegister fd, FPURegister fs) {
void TurboAssembler::Trunc_w_d(FPURegister fd, FPURegister fs) {
if (IsMipsArchVariant(kLoongson) && fd == fs) {
Mfhc1(t8, fs);
trunc_w_d(fd, fs);
......@@ -1871,8 +1871,7 @@ void MacroAssembler::Trunc_w_d(FPURegister fd, FPURegister fs) {
}
}
void MacroAssembler::Round_w_d(FPURegister fd, FPURegister fs) {
void TurboAssembler::Round_w_d(FPURegister fd, FPURegister fs) {
if (IsMipsArchVariant(kLoongson) && fd == fs) {
Mfhc1(t8, fs);
round_w_d(fd, fs);
......@@ -1882,8 +1881,7 @@ void MacroAssembler::Round_w_d(FPURegister fd, FPURegister fs) {
}
}
void MacroAssembler::Floor_w_d(FPURegister fd, FPURegister fs) {
void TurboAssembler::Floor_w_d(FPURegister fd, FPURegister fs) {
if (IsMipsArchVariant(kLoongson) && fd == fs) {
Mfhc1(t8, fs);
floor_w_d(fd, fs);
......@@ -1893,8 +1891,7 @@ void MacroAssembler::Floor_w_d(FPURegister fd, FPURegister fs) {
}
}
void MacroAssembler::Ceil_w_d(FPURegister fd, FPURegister fs) {
void TurboAssembler::Ceil_w_d(FPURegister fd, FPURegister fs) {
if (IsMipsArchVariant(kLoongson) && fd == fs) {
Mfhc1(t8, fs);
ceil_w_d(fd, fs);
......
......@@ -609,6 +609,11 @@ class TurboAssembler : public Assembler {
void Trunc_uw_s(FPURegister fd, FPURegister fs, FPURegister scratch);
void Trunc_uw_s(FPURegister fd, Register rs, FPURegister scratch);
void Trunc_w_d(FPURegister fd, FPURegister fs);
void Round_w_d(FPURegister fd, FPURegister fs);
void Floor_w_d(FPURegister fd, FPURegister fs);
void Ceil_w_d(FPURegister fd, FPURegister fs);
// FP32 mode: Move the general purpose register into
// the high part of the double-register pair.
// FP64 mode: Move the general-purpose register into
......@@ -1057,11 +1062,6 @@ class MacroAssembler : public TurboAssembler {
void PushSafepointRegisters();
void PopSafepointRegisters();
void Trunc_w_d(FPURegister fd, FPURegister fs);
void Round_w_d(FPURegister fd, FPURegister fs);
void Floor_w_d(FPURegister fd, FPURegister fs);
void Ceil_w_d(FPURegister fd, FPURegister fs);
// Truncates a double using a specific rounding mode, and writes the value
// to the result register.
// The except_flag will contain any exceptions caused by the instruction.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment