OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stdarg.h> | 5 #include <stdarg.h> |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #if V8_TARGET_ARCH_S390 | 9 #if V8_TARGET_ARCH_S390 |
10 | 10 |
(...skipping 8751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8762 return 0; | 8762 return 0; |
8763 } | 8763 } |
8764 | 8764 |
8765 EVALUATE(DEBR) { | 8765 EVALUATE(DEBR) { |
8766 DCHECK_OPCODE(DEBR); | 8766 DCHECK_OPCODE(DEBR); |
8767 DECODE_RRE_INSTRUCTION(r1, r2); | 8767 DECODE_RRE_INSTRUCTION(r1, r2); |
8768 float fr1_val = get_float32_from_d_register(r1); | 8768 float fr1_val = get_float32_from_d_register(r1); |
8769 float fr2_val = get_float32_from_d_register(r2); | 8769 float fr2_val = get_float32_from_d_register(r2); |
8770 fr1_val /= fr2_val; | 8770 fr1_val /= fr2_val; |
8771 set_d_register_from_float32(r1, fr1_val); | 8771 set_d_register_from_float32(r1, fr1_val); |
8772 SetS390ConditionCode<float>(fr1_val, 0); | |
8773 | |
8774 return length; | 8772 return length; |
8775 } | 8773 } |
8776 | 8774 |
8777 EVALUATE(MAEBR) { | 8775 EVALUATE(MAEBR) { |
8778 UNIMPLEMENTED(); | 8776 UNIMPLEMENTED(); |
8779 USE(instr); | 8777 USE(instr); |
8780 return 0; | 8778 return 0; |
8781 } | 8779 } |
8782 | 8780 |
8783 EVALUATE(MSEBR) { | 8781 EVALUATE(MSEBR) { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8863 return 0; | 8861 return 0; |
8864 } | 8862 } |
8865 | 8863 |
8866 EVALUATE(MEEBR) { | 8864 EVALUATE(MEEBR) { |
8867 DCHECK_OPCODE(MEEBR); | 8865 DCHECK_OPCODE(MEEBR); |
8868 DECODE_RRE_INSTRUCTION(r1, r2); | 8866 DECODE_RRE_INSTRUCTION(r1, r2); |
8869 float fr1_val = get_float32_from_d_register(r1); | 8867 float fr1_val = get_float32_from_d_register(r1); |
8870 float fr2_val = get_float32_from_d_register(r2); | 8868 float fr2_val = get_float32_from_d_register(r2); |
8871 fr1_val *= fr2_val; | 8869 fr1_val *= fr2_val; |
8872 set_d_register_from_float32(r1, fr1_val); | 8870 set_d_register_from_float32(r1, fr1_val); |
8873 SetS390ConditionCode<float>(fr1_val, 0); | |
8874 return length; | 8871 return length; |
8875 } | 8872 } |
8876 | 8873 |
8877 EVALUATE(KDBR) { | 8874 EVALUATE(KDBR) { |
8878 UNIMPLEMENTED(); | 8875 UNIMPLEMENTED(); |
8879 USE(instr); | 8876 USE(instr); |
8880 return 0; | 8877 return 0; |
8881 } | 8878 } |
8882 | 8879 |
8883 EVALUATE(CDBR) { | 8880 EVALUATE(CDBR) { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8915 return length; | 8912 return length; |
8916 } | 8913 } |
8917 | 8914 |
8918 EVALUATE(MDBR) { | 8915 EVALUATE(MDBR) { |
8919 DCHECK_OPCODE(MDBR); | 8916 DCHECK_OPCODE(MDBR); |
8920 DECODE_RRE_INSTRUCTION(r1, r2); | 8917 DECODE_RRE_INSTRUCTION(r1, r2); |
8921 double r1_val = get_double_from_d_register(r1); | 8918 double r1_val = get_double_from_d_register(r1); |
8922 double r2_val = get_double_from_d_register(r2); | 8919 double r2_val = get_double_from_d_register(r2); |
8923 r1_val *= r2_val; | 8920 r1_val *= r2_val; |
8924 set_d_register_from_double(r1, r1_val); | 8921 set_d_register_from_double(r1, r1_val); |
8925 SetS390ConditionCode<double>(r1_val, 0); | |
8926 return length; | 8922 return length; |
8927 } | 8923 } |
8928 | 8924 |
8929 EVALUATE(DDBR) { | 8925 EVALUATE(DDBR) { |
8930 DCHECK_OPCODE(DDBR); | 8926 DCHECK_OPCODE(DDBR); |
8931 DECODE_RRE_INSTRUCTION(r1, r2); | 8927 DECODE_RRE_INSTRUCTION(r1, r2); |
8932 double r1_val = get_double_from_d_register(r1); | 8928 double r1_val = get_double_from_d_register(r1); |
8933 double r2_val = get_double_from_d_register(r2); | 8929 double r2_val = get_double_from_d_register(r2); |
8934 r1_val /= r2_val; | 8930 r1_val /= r2_val; |
8935 set_d_register_from_double(r1, r1_val); | 8931 set_d_register_from_double(r1, r1_val); |
8936 SetS390ConditionCode<double>(r1_val, 0); | |
8937 return length; | 8932 return length; |
8938 } | 8933 } |
8939 | 8934 |
8940 EVALUATE(MADBR) { | 8935 EVALUATE(MADBR) { |
8941 DCHECK_OPCODE(MADBR); | 8936 DCHECK_OPCODE(MADBR); |
8942 DECODE_RRD_INSTRUCTION(r1, r2, r3); | 8937 DECODE_RRD_INSTRUCTION(r1, r2, r3); |
8943 double r1_val = get_double_from_d_register(r1); | 8938 double r1_val = get_double_from_d_register(r1); |
8944 double r2_val = get_double_from_d_register(r2); | 8939 double r2_val = get_double_from_d_register(r2); |
8945 double r3_val = get_double_from_d_register(r3); | 8940 double r3_val = get_double_from_d_register(r3); |
8946 r1_val += r2_val * r3_val; | 8941 r1_val += r2_val * r3_val; |
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10428 DCHECK_OPCODE(DLGR); | 10423 DCHECK_OPCODE(DLGR); |
10429 #ifdef V8_TARGET_ARCH_S390X | 10424 #ifdef V8_TARGET_ARCH_S390X |
10430 DECODE_RRE_INSTRUCTION(r1, r2); | 10425 DECODE_RRE_INSTRUCTION(r1, r2); |
10431 uint64_t r1_val = get_register(r1); | 10426 uint64_t r1_val = get_register(r1); |
10432 uint64_t r2_val = get_register(r2); | 10427 uint64_t r2_val = get_register(r2); |
10433 DCHECK(r1 % 2 == 0); | 10428 DCHECK(r1 % 2 == 0); |
10434 unsigned __int128 dividend = static_cast<unsigned __int128>(r1_val) << 64; | 10429 unsigned __int128 dividend = static_cast<unsigned __int128>(r1_val) << 64; |
10435 dividend += get_register(r1 + 1); | 10430 dividend += get_register(r1 + 1); |
10436 uint64_t remainder = dividend % r2_val; | 10431 uint64_t remainder = dividend % r2_val; |
10437 uint64_t quotient = dividend / r2_val; | 10432 uint64_t quotient = dividend / r2_val; |
10438 r1_val = remainder; | |
10439 set_register(r1, remainder); | 10433 set_register(r1, remainder); |
10440 set_register(r1 + 1, quotient); | 10434 set_register(r1 + 1, quotient); |
10441 return length; | 10435 return length; |
10442 #else | 10436 #else |
| 10437 // 32 bit arch doesn't support __int128 type |
| 10438 USE(instr); |
10443 UNREACHABLE(); | 10439 UNREACHABLE(); |
| 10440 return 0; |
10444 #endif | 10441 #endif |
10445 } | 10442 } |
10446 | 10443 |
10447 EVALUATE(ALCGR) { | 10444 EVALUATE(ALCGR) { |
10448 UNIMPLEMENTED(); | 10445 UNIMPLEMENTED(); |
10449 USE(instr); | 10446 USE(instr); |
10450 return 0; | 10447 return 0; |
10451 } | 10448 } |
10452 | 10449 |
10453 EVALUATE(SLBGR) { | 10450 EVALUATE(SLBGR) { |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10919 return 0; | 10916 return 0; |
10920 } | 10917 } |
10921 | 10918 |
10922 EVALUATE(AG) { | 10919 EVALUATE(AG) { |
10923 DCHECK_OPCODE(AG); | 10920 DCHECK_OPCODE(AG); |
10924 DECODE_RXY_A_INSTRUCTION(r1, x2, b2, d2); | 10921 DECODE_RXY_A_INSTRUCTION(r1, x2, b2, d2); |
10925 int64_t x2_val = (x2 == 0) ? 0 : get_register(x2); | 10922 int64_t x2_val = (x2 == 0) ? 0 : get_register(x2); |
10926 int64_t b2_val = (b2 == 0) ? 0 : get_register(b2); | 10923 int64_t b2_val = (b2 == 0) ? 0 : get_register(b2); |
10927 int64_t alu_out = get_register(r1); | 10924 int64_t alu_out = get_register(r1); |
10928 int64_t mem_val = ReadDW(b2_val + x2_val + d2); | 10925 int64_t mem_val = ReadDW(b2_val + x2_val + d2); |
| 10926 bool isOF = CheckOverflowForIntAdd(alu_out, mem_val, int64_t); |
10929 alu_out += mem_val; | 10927 alu_out += mem_val; |
10930 SetS390ConditionCode<int32_t>(alu_out, 0); | 10928 SetS390ConditionCode<int64_t>(alu_out, 0); |
| 10929 SetS390OverflowCode(isOF); |
10931 set_register(r1, alu_out); | 10930 set_register(r1, alu_out); |
10932 return length; | 10931 return length; |
10933 } | 10932 } |
10934 | 10933 |
10935 EVALUATE(SG) { | 10934 EVALUATE(SG) { |
10936 DCHECK_OPCODE(SG); | 10935 DCHECK_OPCODE(SG); |
10937 DECODE_RXY_A_INSTRUCTION(r1, x2, b2, d2); | 10936 DECODE_RXY_A_INSTRUCTION(r1, x2, b2, d2); |
10938 int64_t x2_val = (x2 == 0) ? 0 : get_register(x2); | 10937 int64_t x2_val = (x2 == 0) ? 0 : get_register(x2); |
10939 int64_t b2_val = (b2 == 0) ? 0 : get_register(b2); | 10938 int64_t b2_val = (b2 == 0) ? 0 : get_register(b2); |
10940 int64_t alu_out = get_register(r1); | 10939 int64_t alu_out = get_register(r1); |
10941 int64_t mem_val = ReadDW(b2_val + x2_val + d2); | 10940 int64_t mem_val = ReadDW(b2_val + x2_val + d2); |
| 10941 bool isOF = CheckOverflowForIntSub(alu_out, mem_val, int64_t); |
10942 alu_out -= mem_val; | 10942 alu_out -= mem_val; |
10943 SetS390ConditionCode<int32_t>(alu_out, 0); | 10943 SetS390ConditionCode<int32_t>(alu_out, 0); |
| 10944 SetS390OverflowCode(isOF); |
10944 set_register(r1, alu_out); | 10945 set_register(r1, alu_out); |
10945 return length; | 10946 return length; |
10946 } | 10947 } |
10947 | 10948 |
10948 EVALUATE(ALG) { | 10949 EVALUATE(ALG) { |
10949 DCHECK_OPCODE(ALG); | 10950 DCHECK_OPCODE(ALG); |
10950 #ifndef V8_TARGET_ARCH_S390X | 10951 #ifndef V8_TARGET_ARCH_S390X |
10951 DCHECK(false); | 10952 DCHECK(false); |
10952 #endif | 10953 #endif |
10953 DECODE_RXY_A_INSTRUCTION(r1, x2, b2, d2); | 10954 DECODE_RXY_A_INSTRUCTION(r1, x2, b2, d2); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10987 int64_t b2_val = (b2 == 0) ? 0 : get_register(b2); | 10988 int64_t b2_val = (b2 == 0) ? 0 : get_register(b2); |
10988 int64_t x2_val = (x2 == 0) ? 0 : get_register(x2); | 10989 int64_t x2_val = (x2 == 0) ? 0 : get_register(x2); |
10989 intptr_t d2_val = d2; | 10990 intptr_t d2_val = d2; |
10990 int64_t mem_val = ReadDW(b2_val + d2_val + x2_val); | 10991 int64_t mem_val = ReadDW(b2_val + d2_val + x2_val); |
10991 int64_t r1_val = get_register(r1); | 10992 int64_t r1_val = get_register(r1); |
10992 set_register(r1, mem_val * r1_val); | 10993 set_register(r1, mem_val * r1_val); |
10993 return length; | 10994 return length; |
10994 } | 10995 } |
10995 | 10996 |
10996 EVALUATE(DSG) { | 10997 EVALUATE(DSG) { |
10997 UNIMPLEMENTED(); | 10998 DCHECK_OPCODE(DSG); |
10998 USE(instr); | 10999 DECODE_RXY_A_INSTRUCTION(r1, x2, b2, d2); |
10999 return 0; | 11000 DCHECK(r1 % 2 == 0); |
| 11001 int64_t b2_val = (b2 == 0) ? 0 : get_register(b2); |
| 11002 int64_t x2_val = (x2 == 0) ? 0 : get_register(x2); |
| 11003 intptr_t d2_val = d2; |
| 11004 int64_t mem_val = ReadDW(b2_val + d2_val + x2_val); |
| 11005 int64_t r1_val = get_register(r1 + 1); |
| 11006 int64_t quotient = r1_val / mem_val; |
| 11007 int64_t remainder = r1_val % mem_val; |
| 11008 set_register(r1, remainder); |
| 11009 set_register(r1 + 1, quotient); |
| 11010 return length; |
11000 } | 11011 } |
11001 | 11012 |
11002 EVALUATE(CVBG) { | 11013 EVALUATE(CVBG) { |
11003 UNIMPLEMENTED(); | 11014 UNIMPLEMENTED(); |
11004 USE(instr); | 11015 USE(instr); |
11005 return 0; | 11016 return 0; |
11006 } | 11017 } |
11007 | 11018 |
11008 EVALUATE(LT) { | 11019 EVALUATE(LT) { |
11009 DCHECK_OPCODE(LT); | 11020 DCHECK_OPCODE(LT); |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11597 return 0; | 11608 return 0; |
11598 } | 11609 } |
11599 | 11610 |
11600 EVALUATE(MLG) { | 11611 EVALUATE(MLG) { |
11601 UNIMPLEMENTED(); | 11612 UNIMPLEMENTED(); |
11602 USE(instr); | 11613 USE(instr); |
11603 return 0; | 11614 return 0; |
11604 } | 11615 } |
11605 | 11616 |
11606 EVALUATE(DLG) { | 11617 EVALUATE(DLG) { |
11607 UNIMPLEMENTED(); | 11618 DCHECK_OPCODE(DLG); |
| 11619 #ifdef V8_TARGET_ARCH_S390X |
| 11620 DECODE_RXY_A_INSTRUCTION(r1, x2, b2, d2); |
| 11621 uint64_t r1_val = get_register(r1); |
| 11622 int64_t x2_val = (x2 == 0) ? 0 : get_register(x2); |
| 11623 int64_t b2_val = (b2 == 0) ? 0 : get_register(b2); |
| 11624 DCHECK(r1 % 2 == 0); |
| 11625 unsigned __int128 dividend = static_cast<unsigned __int128>(r1_val) << 64; |
| 11626 dividend += get_register(r1 + 1); |
| 11627 int64_t mem_val = ReadDW(b2_val + x2_val + d2); |
| 11628 uint64_t remainder = dividend % mem_val; |
| 11629 uint64_t quotient = dividend / mem_val; |
| 11630 set_register(r1, remainder); |
| 11631 set_register(r1 + 1, quotient); |
| 11632 return length; |
| 11633 #else |
| 11634 // 32 bit arch doesn't support __int128 type |
11608 USE(instr); | 11635 USE(instr); |
| 11636 UNREACHABLE(); |
11609 return 0; | 11637 return 0; |
| 11638 #endif |
11610 } | 11639 } |
11611 | 11640 |
11612 EVALUATE(ALCG) { | 11641 EVALUATE(ALCG) { |
11613 UNIMPLEMENTED(); | 11642 UNIMPLEMENTED(); |
11614 USE(instr); | 11643 USE(instr); |
11615 return 0; | 11644 return 0; |
11616 } | 11645 } |
11617 | 11646 |
11618 EVALUATE(SLBG) { | 11647 EVALUATE(SLBG) { |
11619 UNIMPLEMENTED(); | 11648 UNIMPLEMENTED(); |
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12502 } | 12531 } |
12503 | 12532 |
12504 EVALUATE(CIB) { | 12533 EVALUATE(CIB) { |
12505 UNIMPLEMENTED(); | 12534 UNIMPLEMENTED(); |
12506 USE(instr); | 12535 USE(instr); |
12507 return 0; | 12536 return 0; |
12508 } | 12537 } |
12509 | 12538 |
12510 EVALUATE(LDEB) { | 12539 EVALUATE(LDEB) { |
12511 DCHECK_OPCODE(LDEB); | 12540 DCHECK_OPCODE(LDEB); |
12512 // Load Float | |
12513 DECODE_RXE_INSTRUCTION(r1, b2, x2, d2); | 12541 DECODE_RXE_INSTRUCTION(r1, b2, x2, d2); |
12514 int rb = b2; | 12542 int rb = b2; |
12515 int rx = x2; | 12543 int rx = x2; |
12516 int offset = d2; | 12544 int offset = d2; |
12517 int64_t rb_val = (rb == 0) ? 0 : get_register(rb); | 12545 int64_t rb_val = (rb == 0) ? 0 : get_register(rb); |
12518 int64_t rx_val = (rx == 0) ? 0 : get_register(rx); | 12546 int64_t rx_val = (rx == 0) ? 0 : get_register(rx); |
12519 double ret = | 12547 float fval = ReadFloat(rx_val + rb_val + offset); |
12520 static_cast<double>(*reinterpret_cast<float*>(rx_val + rb_val + offset)); | 12548 set_d_register_from_double(r1, static_cast<double>(fval)); |
12521 set_d_register_from_double(r1, ret); | |
12522 return length; | 12549 return length; |
12523 } | 12550 } |
12524 | 12551 |
12525 EVALUATE(LXDB) { | 12552 EVALUATE(LXDB) { |
12526 UNIMPLEMENTED(); | 12553 UNIMPLEMENTED(); |
12527 USE(instr); | 12554 USE(instr); |
12528 return 0; | 12555 return 0; |
12529 } | 12556 } |
12530 | 12557 |
12531 EVALUATE(LXEB) { | 12558 EVALUATE(LXEB) { |
(...skipping 21 matching lines...) Expand all Loading... |
12553 int64_t b2_val = (b2 == 0) ? 0 : get_register(b2); | 12580 int64_t b2_val = (b2 == 0) ? 0 : get_register(b2); |
12554 int64_t x2_val = (x2 == 0) ? 0 : get_register(x2); | 12581 int64_t x2_val = (x2 == 0) ? 0 : get_register(x2); |
12555 intptr_t d2_val = d2; | 12582 intptr_t d2_val = d2; |
12556 float r1_val = get_float32_from_d_register(r1); | 12583 float r1_val = get_float32_from_d_register(r1); |
12557 float fval = ReadFloat(b2_val + x2_val + d2_val); | 12584 float fval = ReadFloat(b2_val + x2_val + d2_val); |
12558 SetS390ConditionCode<float>(r1_val, fval); | 12585 SetS390ConditionCode<float>(r1_val, fval); |
12559 return length; | 12586 return length; |
12560 } | 12587 } |
12561 | 12588 |
12562 EVALUATE(AEB) { | 12589 EVALUATE(AEB) { |
12563 UNIMPLEMENTED(); | 12590 DCHECK_OPCODE(AEB); |
12564 USE(instr); | 12591 DECODE_RXE_INSTRUCTION(r1, b2, x2, d2); |
12565 return 0; | 12592 int64_t b2_val = (b2 == 0) ? 0 : get_register(b2); |
| 12593 int64_t x2_val = (x2 == 0) ? 0 : get_register(x2); |
| 12594 intptr_t d2_val = d2; |
| 12595 float r1_val = get_float32_from_d_register(r1); |
| 12596 float fval = ReadFloat(b2_val + x2_val + d2_val); |
| 12597 r1_val += fval; |
| 12598 set_d_register_from_float32(r1, r1_val); |
| 12599 SetS390ConditionCode<float>(r1_val, 0); |
| 12600 return length; |
12566 } | 12601 } |
12567 | 12602 |
12568 EVALUATE(SEB) { | 12603 EVALUATE(SEB) { |
12569 UNIMPLEMENTED(); | 12604 DCHECK_OPCODE(SEB); |
12570 USE(instr); | 12605 DECODE_RXE_INSTRUCTION(r1, b2, x2, d2); |
12571 return 0; | 12606 int64_t b2_val = (b2 == 0) ? 0 : get_register(b2); |
| 12607 int64_t x2_val = (x2 == 0) ? 0 : get_register(x2); |
| 12608 intptr_t d2_val = d2; |
| 12609 float r1_val = get_float32_from_d_register(r1); |
| 12610 float fval = ReadFloat(b2_val + x2_val + d2_val); |
| 12611 r1_val -= fval; |
| 12612 set_d_register_from_float32(r1, r1_val); |
| 12613 SetS390ConditionCode<float>(r1_val, 0); |
| 12614 return length; |
12572 } | 12615 } |
12573 | 12616 |
12574 EVALUATE(MDEB) { | 12617 EVALUATE(MDEB) { |
12575 UNIMPLEMENTED(); | 12618 UNIMPLEMENTED(); |
12576 USE(instr); | 12619 USE(instr); |
12577 return 0; | 12620 return 0; |
12578 } | 12621 } |
12579 | 12622 |
12580 EVALUATE(DEB) { | 12623 EVALUATE(DEB) { |
12581 UNIMPLEMENTED(); | 12624 DCHECK_OPCODE(DEB); |
12582 USE(instr); | 12625 DECODE_RXE_INSTRUCTION(r1, b2, x2, d2); |
12583 return 0; | 12626 int64_t b2_val = (b2 == 0) ? 0 : get_register(b2); |
| 12627 int64_t x2_val = (x2 == 0) ? 0 : get_register(x2); |
| 12628 intptr_t d2_val = d2; |
| 12629 float r1_val = get_float32_from_d_register(r1); |
| 12630 float fval = ReadFloat(b2_val + x2_val + d2_val); |
| 12631 r1_val /= fval; |
| 12632 set_d_register_from_float32(r1, r1_val); |
| 12633 return length; |
12584 } | 12634 } |
12585 | 12635 |
12586 EVALUATE(MAEB) { | 12636 EVALUATE(MAEB) { |
12587 UNIMPLEMENTED(); | 12637 UNIMPLEMENTED(); |
12588 USE(instr); | 12638 USE(instr); |
12589 return 0; | 12639 return 0; |
12590 } | 12640 } |
12591 | 12641 |
12592 EVALUATE(MSEB) { | 12642 EVALUATE(MSEB) { |
12593 UNIMPLEMENTED(); | 12643 UNIMPLEMENTED(); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12626 int64_t x2_val = (x2 == 0) ? 0 : get_register(x2); | 12676 int64_t x2_val = (x2 == 0) ? 0 : get_register(x2); |
12627 intptr_t d2_val = d2; | 12677 intptr_t d2_val = d2; |
12628 double r1_val = get_double_from_d_register(r1); | 12678 double r1_val = get_double_from_d_register(r1); |
12629 double dbl_val = ReadDouble(b2_val + x2_val + d2_val); | 12679 double dbl_val = ReadDouble(b2_val + x2_val + d2_val); |
12630 r1_val = std::sqrt(dbl_val); | 12680 r1_val = std::sqrt(dbl_val); |
12631 set_d_register_from_double(r1, r1_val); | 12681 set_d_register_from_double(r1, r1_val); |
12632 return length; | 12682 return length; |
12633 } | 12683 } |
12634 | 12684 |
12635 EVALUATE(MEEB) { | 12685 EVALUATE(MEEB) { |
12636 UNIMPLEMENTED(); | 12686 DCHECK_OPCODE(MEEB); |
12637 USE(instr); | 12687 DECODE_RXE_INSTRUCTION(r1, b2, x2, d2); |
12638 return 0; | 12688 int64_t b2_val = (b2 == 0) ? 0 : get_register(b2); |
| 12689 int64_t x2_val = (x2 == 0) ? 0 : get_register(x2); |
| 12690 intptr_t d2_val = d2; |
| 12691 float r1_val = get_float32_from_d_register(r1); |
| 12692 float fval = ReadFloat(b2_val + x2_val + d2_val); |
| 12693 r1_val *= fval; |
| 12694 set_d_register_from_float32(r1, r1_val); |
| 12695 return length; |
12639 } | 12696 } |
12640 | 12697 |
12641 EVALUATE(KDB) { | 12698 EVALUATE(KDB) { |
12642 UNIMPLEMENTED(); | 12699 UNIMPLEMENTED(); |
12643 USE(instr); | 12700 USE(instr); |
12644 return 0; | 12701 return 0; |
12645 } | 12702 } |
12646 | 12703 |
12647 EVALUATE(CDB) { | 12704 EVALUATE(CDB) { |
12648 DCHECK_OPCODE(CDB); | 12705 DCHECK_OPCODE(CDB); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12689 EVALUATE(MDB) { | 12746 EVALUATE(MDB) { |
12690 DCHECK_OPCODE(MDB); | 12747 DCHECK_OPCODE(MDB); |
12691 DECODE_RXE_INSTRUCTION(r1, b2, x2, d2); | 12748 DECODE_RXE_INSTRUCTION(r1, b2, x2, d2); |
12692 int64_t b2_val = (b2 == 0) ? 0 : get_register(b2); | 12749 int64_t b2_val = (b2 == 0) ? 0 : get_register(b2); |
12693 int64_t x2_val = (x2 == 0) ? 0 : get_register(x2); | 12750 int64_t x2_val = (x2 == 0) ? 0 : get_register(x2); |
12694 intptr_t d2_val = d2; | 12751 intptr_t d2_val = d2; |
12695 double r1_val = get_double_from_d_register(r1); | 12752 double r1_val = get_double_from_d_register(r1); |
12696 double dbl_val = ReadDouble(b2_val + x2_val + d2_val); | 12753 double dbl_val = ReadDouble(b2_val + x2_val + d2_val); |
12697 r1_val *= dbl_val; | 12754 r1_val *= dbl_val; |
12698 set_d_register_from_double(r1, r1_val); | 12755 set_d_register_from_double(r1, r1_val); |
12699 SetS390ConditionCode<double>(r1_val, 0); | |
12700 return length; | 12756 return length; |
12701 } | 12757 } |
12702 | 12758 |
12703 EVALUATE(DDB) { | 12759 EVALUATE(DDB) { |
12704 DCHECK_OPCODE(DDB); | 12760 DCHECK_OPCODE(DDB); |
12705 DECODE_RXE_INSTRUCTION(r1, b2, x2, d2); | 12761 DECODE_RXE_INSTRUCTION(r1, b2, x2, d2); |
12706 int64_t b2_val = (b2 == 0) ? 0 : get_register(b2); | 12762 int64_t b2_val = (b2 == 0) ? 0 : get_register(b2); |
12707 int64_t x2_val = (x2 == 0) ? 0 : get_register(x2); | 12763 int64_t x2_val = (x2 == 0) ? 0 : get_register(x2); |
12708 intptr_t d2_val = d2; | 12764 intptr_t d2_val = d2; |
12709 double r1_val = get_double_from_d_register(r1); | 12765 double r1_val = get_double_from_d_register(r1); |
12710 double dbl_val = ReadDouble(b2_val + x2_val + d2_val); | 12766 double dbl_val = ReadDouble(b2_val + x2_val + d2_val); |
12711 r1_val /= dbl_val; | 12767 r1_val /= dbl_val; |
12712 set_d_register_from_double(r1, r1_val); | 12768 set_d_register_from_double(r1, r1_val); |
12713 SetS390ConditionCode<double>(r1_val, 0); | |
12714 return length; | 12769 return length; |
12715 } | 12770 } |
12716 | 12771 |
12717 EVALUATE(MADB) { | 12772 EVALUATE(MADB) { |
12718 UNIMPLEMENTED(); | 12773 UNIMPLEMENTED(); |
12719 USE(instr); | 12774 USE(instr); |
12720 return 0; | 12775 return 0; |
12721 } | 12776 } |
12722 | 12777 |
12723 EVALUATE(MSDB) { | 12778 EVALUATE(MSDB) { |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12858 return 0; | 12913 return 0; |
12859 } | 12914 } |
12860 | 12915 |
12861 #undef EVALUATE | 12916 #undef EVALUATE |
12862 | 12917 |
12863 } // namespace internal | 12918 } // namespace internal |
12864 } // namespace v8 | 12919 } // namespace v8 |
12865 | 12920 |
12866 #endif // USE_SIMULATOR | 12921 #endif // USE_SIMULATOR |
12867 #endif // V8_TARGET_ARCH_S390 | 12922 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |