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

Unified Diff: src/s390/simulator-s390.cc

Issue 2696343002: s390: optimize for compares (Closed)
Patch Set: add todo Created 3 years, 10 months 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/simulator-s390.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/s390/simulator-s390.cc
diff --git a/src/s390/simulator-s390.cc b/src/s390/simulator-s390.cc
index fe3d96d00f922863ac81f4c67ff5d0e0ea161181..dcdee92d1f456e0ac697c1b0ccf9827e005b2a8e 100644
--- a/src/s390/simulator-s390.cc
+++ b/src/s390/simulator-s390.cc
@@ -1848,6 +1848,11 @@ double Simulator::ReadDouble(intptr_t addr) {
return *ptr;
}
+float Simulator::ReadFloat(intptr_t addr) {
+ float* ptr = reinterpret_cast<float*>(addr);
+ return *ptr;
+}
+
// Returns the limit of the stack area to enable checking for stack overflows.
uintptr_t Simulator::StackLimit(uintptr_t c_limit) const {
// The simulator uses a separate JS stack. If we have exhausted the C stack,
@@ -12511,9 +12516,16 @@ EVALUATE(KEB) {
}
EVALUATE(CEB) {
- UNIMPLEMENTED();
- USE(instr);
- return 0;
+ DCHECK_OPCODE(CEB);
+
+ DECODE_RXE_INSTRUCTION(r1, b2, x2, d2);
+ int64_t b2_val = (b2 == 0) ? 0 : get_register(b2);
+ int64_t x2_val = (x2 == 0) ? 0 : get_register(x2);
+ intptr_t d2_val = d2;
+ float r1_val = get_float32_from_d_register(r1);
+ float fval = ReadFloat(b2_val + x2_val + d2_val);
+ SetS390ConditionCode<float>(r1_val, fval);
+ return length;
}
EVALUATE(AEB) {
« no previous file with comments | « src/s390/simulator-s390.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698