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

Side by Side Diff: src/s390/assembler-s390.cc

Issue 2220313002: S390: Decouple Add/Sub/Neg to 32/64 Bit Op (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix Neg32 to use lcr Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « src/s390/assembler-s390.h ('k') | src/s390/disasm-s390.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 uint64_t code = (static_cast<uint64_t>(op & 0xFF00)) * B32 | 964 uint64_t code = (static_cast<uint64_t>(op & 0xFF00)) * B32 |
965 (static_cast<uint64_t>(r1.code())) * B36 | 965 (static_cast<uint64_t>(r1.code())) * B36 |
966 (static_cast<uint64_t>(x2.code())) * B32 | 966 (static_cast<uint64_t>(x2.code())) * B32 |
967 (static_cast<uint64_t>(b2.code())) * B28 | 967 (static_cast<uint64_t>(b2.code())) * B28 |
968 (static_cast<uint64_t>(d2 & 0x0FFF)) * B16 | 968 (static_cast<uint64_t>(d2 & 0x0FFF)) * B16 |
969 (static_cast<uint64_t>(d2 & 0x0FF000)) >> 4 | 969 (static_cast<uint64_t>(d2 & 0x0FF000)) >> 4 |
970 (static_cast<uint64_t>(op & 0x00FF)); 970 (static_cast<uint64_t>(op & 0x00FF));
971 emit6bytes(code); 971 emit6bytes(code);
972 } 972 }
973 973
974 void Assembler::rxy_form(Opcode op, Register r1, Condition m3, Register b2,
975 Disp d2) {
976 DCHECK(is_int20(d2));
977 DCHECK(is_uint16(op));
978 uint64_t code = (static_cast<uint64_t>(op & 0xFF00)) * B32 |
979 (static_cast<uint64_t>(r1.code())) * B36 |
980 (static_cast<uint64_t>(m3 & 0xF)) * B32 |
981 (static_cast<uint64_t>(b2.code())) * B28 |
982 (static_cast<uint64_t>(d2 & 0x0FFF)) * B16 |
983 (static_cast<uint64_t>(d2 & 0x0FF000)) >> 4 |
984 (static_cast<uint64_t>(op & 0x00FF));
985 emit6bytes(code);
986 }
987
974 void Assembler::rxy_form(Opcode op, DoubleRegister r1, Register x2, Register b2, 988 void Assembler::rxy_form(Opcode op, DoubleRegister r1, Register x2, Register b2,
975 Disp d2) { 989 Disp d2) {
976 DCHECK(is_int20(d2)); 990 DCHECK(is_int20(d2));
977 DCHECK(is_uint16(op)); 991 DCHECK(is_uint16(op));
978 uint64_t code = (static_cast<uint64_t>(op & 0xFF00)) * B32 | 992 uint64_t code = (static_cast<uint64_t>(op & 0xFF00)) * B32 |
979 (static_cast<uint64_t>(r1.code())) * B36 | 993 (static_cast<uint64_t>(r1.code())) * B36 |
980 (static_cast<uint64_t>(x2.code())) * B32 | 994 (static_cast<uint64_t>(x2.code())) * B32 |
981 (static_cast<uint64_t>(b2.code())) * B28 | 995 (static_cast<uint64_t>(b2.code())) * B28 |
982 (static_cast<uint64_t>(d2 & 0x0FFF)) * B16 | 996 (static_cast<uint64_t>(d2 & 0x0FFF)) * B16 |
983 (static_cast<uint64_t>(d2 & 0x0FF000)) >> 4 | 997 (static_cast<uint64_t>(d2 & 0x0FF000)) >> 4 |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 RX_FORM_EMIT(ex, EX) 1425 RX_FORM_EMIT(ex, EX)
1412 RRE_FORM_EMIT(flogr, FLOGR) 1426 RRE_FORM_EMIT(flogr, FLOGR)
1413 RRE_FORM_EMIT(lcgr, LCGR) 1427 RRE_FORM_EMIT(lcgr, LCGR)
1414 RR_FORM_EMIT(lcr, LCR) 1428 RR_FORM_EMIT(lcr, LCR)
1415 RX_FORM_EMIT(le_z, LE) 1429 RX_FORM_EMIT(le_z, LE)
1416 RXY_FORM_EMIT(ley, LEY) 1430 RXY_FORM_EMIT(ley, LEY)
1417 RIL1_FORM_EMIT(llihf, LLIHF) 1431 RIL1_FORM_EMIT(llihf, LLIHF)
1418 RIL1_FORM_EMIT(llilf, LLILF) 1432 RIL1_FORM_EMIT(llilf, LLILF)
1419 RRE_FORM_EMIT(lngr, LNGR) 1433 RRE_FORM_EMIT(lngr, LNGR)
1420 RR_FORM_EMIT(lnr, LNR) 1434 RR_FORM_EMIT(lnr, LNR)
1421 RSY1_FORM_EMIT(loc, LOC)
1422 RRE_FORM_EMIT(lrvr, LRVR) 1435 RRE_FORM_EMIT(lrvr, LRVR)
1423 RRE_FORM_EMIT(lrvgr, LRVGR) 1436 RRE_FORM_EMIT(lrvgr, LRVGR)
1424 RXY_FORM_EMIT(lrv, LRV) 1437 RXY_FORM_EMIT(lrv, LRV)
1425 RXY_FORM_EMIT(lrvg, LRVG) 1438 RXY_FORM_EMIT(lrvg, LRVG)
1426 RXY_FORM_EMIT(lrvh, LRVH) 1439 RXY_FORM_EMIT(lrvh, LRVH)
1427 SS1_FORM_EMIT(mvn, MVN) 1440 SS1_FORM_EMIT(mvn, MVN)
1428 SS1_FORM_EMIT(nc, NC) 1441 SS1_FORM_EMIT(nc, NC)
1429 SI_FORM_EMIT(ni, NI) 1442 SI_FORM_EMIT(ni, NI)
1430 RIL1_FORM_EMIT(nihf, NIHF) 1443 RIL1_FORM_EMIT(nihf, NIHF)
1431 RIL1_FORM_EMIT(nilf, NILF) 1444 RIL1_FORM_EMIT(nilf, NILF)
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1597 void Assembler::llgh(Register r1, const MemOperand& opnd) { 1610 void Assembler::llgh(Register r1, const MemOperand& opnd) {
1598 rxy_form(LLGH, r1, opnd.rx(), opnd.rb(), opnd.offset()); 1611 rxy_form(LLGH, r1, opnd.rx(), opnd.rb(), opnd.offset());
1599 } 1612 }
1600 1613
1601 // Load Logical halfword Register-Register (32) 1614 // Load Logical halfword Register-Register (32)
1602 void Assembler::llhr(Register r1, Register r2) { rre_form(LLHR, r1, r2); } 1615 void Assembler::llhr(Register r1, Register r2) { rre_form(LLHR, r1, r2); }
1603 1616
1604 // Load Logical halfword Register-Register (64) 1617 // Load Logical halfword Register-Register (64)
1605 void Assembler::llghr(Register r1, Register r2) { rre_form(LLGHR, r1, r2); } 1618 void Assembler::llghr(Register r1, Register r2) { rre_form(LLGHR, r1, r2); }
1606 1619
1620 // Load On Condition R-R (32)
1621 void Assembler::locr(Condition m3, Register r1, Register r2) {
1622 rrf2_form(LOCR << 16 | m3 * B12 | r1.code() * B4 | r2.code());
1623 }
1624
1625 // Load On Condition R-R (64)
1626 void Assembler::locgr(Condition m3, Register r1, Register r2) {
1627 rrf2_form(LOCGR << 16 | m3 * B12 | r1.code() * B4 | r2.code());
1628 }
1629
1630 // Load On Condition R-M (32)
1631 void Assembler::loc(Condition m3, Register r1, const MemOperand& src) {
1632 rxy_form(LOC, r1, m3, src.rb(), src.offset());
1633 }
1634
1635 // Load On Condition R-M (64)
1636 void Assembler::locg(Condition m3, Register r1, const MemOperand& src) {
1637 rxy_form(LOCG, r1, m3, src.rb(), src.offset());
1638 }
1639
1607 // ------------------- 1640 // -------------------
1608 // Branch Instructions 1641 // Branch Instructions
1609 // ------------------- 1642 // -------------------
1610 // Branch and Save 1643 // Branch and Save
1611 void Assembler::basr(Register r1, Register r2) { rr_form(BASR, r1, r2); } 1644 void Assembler::basr(Register r1, Register r2) { rr_form(BASR, r1, r2); }
1612 1645
1613 // Indirect Conditional Branch via register 1646 // Indirect Conditional Branch via register
1614 void Assembler::bcr(Condition m, Register target) { rr_form(BCR, m, target); } 1647 void Assembler::bcr(Condition m, Register target) { rr_form(BCR, m, target); }
1615 1648
1616 // Branch on Count (32) 1649 // Branch on Count (32)
(...skipping 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after
3079 SKIP_ICACHE_FLUSH); 3112 SKIP_ICACHE_FLUSH);
3080 } 3113 }
3081 3114
3082 reloc_info_writer.Write(&rinfo); 3115 reloc_info_writer.Write(&rinfo);
3083 } 3116 }
3084 } 3117 }
3085 3118
3086 } // namespace internal 3119 } // namespace internal
3087 } // namespace v8 3120 } // namespace v8
3088 #endif // V8_TARGET_ARCH_S390 3121 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/s390/assembler-s390.h ('k') | src/s390/disasm-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698