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

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

Issue 2667203002: s390: fix ri-c format for brc (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/s390/assembler-s390.cc
diff --git a/src/s390/assembler-s390.cc b/src/s390/assembler-s390.cc
index cbcd3118d95fe2bcf697d4adc9c9a254104f6776..073c5ea9f32412d047f17eeb0d0b5483a71ab2c0 100644
--- a/src/s390/assembler-s390.cc
+++ b/src/s390/assembler-s390.cc
@@ -536,7 +536,7 @@ void Assembler::load_label_offset(Register r1, Label* L) {
void Assembler::branchOnCond(Condition c, int branch_offset, bool is_bound) {
int offset_in_halfwords = branch_offset / 2;
if (is_bound && is_int16(offset_in_halfwords)) {
- brc(c, Operand(offset_in_halfwords & 0xFFFF)); // short jump
+ brc(c, Operand(offset_in_halfwords)); // short jump
} else {
brcl(c, Operand(offset_in_halfwords)); // long jump
}
@@ -647,7 +647,7 @@ void Assembler::ri_form(Opcode op, Register r1, const Operand& i2) {
void Assembler::ri_form(Opcode op, Condition m1, const Operand& i2) {
DCHECK(is_uint12(op));
DCHECK(is_uint4(m1));
- DCHECK(is_uint16(i2.imm_));
+ DCHECK(op == BRC ? is_int16(i2.imm_) : is_uint16(i2.imm_));
emit4bytes((op & 0xFF0) * B20 | m1 * B20 | (op & 0xF) * B16 |
(i2.imm_ & 0xFFFF));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698