Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(687)

Unified Diff: src/s390/macro-assembler-s390.cc

Issue 2593803003: s390: exploit high-word facility for Smi Ops (Closed)
Patch Set: fix native failures Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/s390/macro-assembler-s390.h ('k') | src/s390/simulator-s390.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/s390/macro-assembler-s390.cc
diff --git a/src/s390/macro-assembler-s390.cc b/src/s390/macro-assembler-s390.cc
index ed1daf1feabdc6ee406e3c100fcc8aed3cb98984..36198711b680a7ac1dd616f768704b015165d33c 100644
--- a/src/s390/macro-assembler-s390.cc
+++ b/src/s390/macro-assembler-s390.cc
@@ -4329,8 +4329,12 @@ void MacroAssembler::LoadFloat32Literal(DoubleRegister result, float value,
void MacroAssembler::CmpSmiLiteral(Register src1, Smi* smi, Register scratch) {
#if V8_TARGET_ARCH_S390X
- LoadSmiLiteral(scratch, smi);
- cgr(src1, scratch);
+ if (CpuFeatures::IsSupported(DISTINCT_OPS)) {
+ cih(src1, Operand(reinterpret_cast<intptr_t>(smi) >> 32));
+ } else {
+ LoadSmiLiteral(scratch, smi);
+ cgr(src1, scratch);
+ }
#else
// CFI takes 32-bit immediate.
cfi(src1, Operand(smi));
@@ -4340,8 +4344,12 @@ void MacroAssembler::CmpSmiLiteral(Register src1, Smi* smi, Register scratch) {
void MacroAssembler::CmpLogicalSmiLiteral(Register src1, Smi* smi,
Register scratch) {
#if V8_TARGET_ARCH_S390X
- LoadSmiLiteral(scratch, smi);
- clgr(src1, scratch);
+ if (CpuFeatures::IsSupported(DISTINCT_OPS)) {
+ clih(src1, Operand(reinterpret_cast<intptr_t>(smi) >> 32));
+ } else {
+ LoadSmiLiteral(scratch, smi);
+ clgr(src1, scratch);
+ }
#else
// CLFI takes 32-bit immediate
clfi(src1, Operand(smi));
@@ -4351,8 +4359,13 @@ void MacroAssembler::CmpLogicalSmiLiteral(Register src1, Smi* smi,
void MacroAssembler::AddSmiLiteral(Register dst, Register src, Smi* smi,
Register scratch) {
#if V8_TARGET_ARCH_S390X
- LoadSmiLiteral(scratch, smi);
- AddP(dst, src, scratch);
+ if (CpuFeatures::IsSupported(DISTINCT_OPS)) {
+ if (!dst.is(src)) LoadRR(dst, src);
+ aih(dst, Operand(reinterpret_cast<intptr_t>(smi) >> 32));
+ } else {
+ LoadSmiLiteral(scratch, smi);
+ AddP(dst, src, scratch);
+ }
#else
AddP(dst, src, Operand(reinterpret_cast<intptr_t>(smi)));
#endif
@@ -4361,8 +4374,13 @@ void MacroAssembler::AddSmiLiteral(Register dst, Register src, Smi* smi,
void MacroAssembler::SubSmiLiteral(Register dst, Register src, Smi* smi,
Register scratch) {
#if V8_TARGET_ARCH_S390X
- LoadSmiLiteral(scratch, smi);
- SubP(dst, src, scratch);
+ if (CpuFeatures::IsSupported(DISTINCT_OPS)) {
+ if (!dst.is(src)) LoadRR(dst, src);
+ aih(dst, Operand((-reinterpret_cast<intptr_t>(smi)) >> 32));
+ } else {
+ LoadSmiLiteral(scratch, smi);
+ SubP(dst, src, scratch);
+ }
#else
AddP(dst, src, Operand(-(reinterpret_cast<intptr_t>(smi))));
#endif
« no previous file with comments | « src/s390/macro-assembler-s390.h ('k') | src/s390/simulator-s390.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698