switch (opcode) {
case BX: {
int imm26 = target_pos - pos;
- DCHECK(is_int26(imm26) && (imm26 & (kAAMask | kLKMask)) == 0);
+ CHECK(is_int26(imm26) && (imm26 & (kAAMask | kLKMask)) == 0);
if (imm26 == kInstrSize && !(instr & kLKMask)) {
// Branch to next instr without link.
instr = ORI; // nop: ori, 0,0,0
}
case BCX: {
int imm16 = target_pos - pos;
- DCHECK(is_int16(imm16) && (imm16 & (kAAMask | kLKMask)) == 0);
+ CHECK(is_int16(imm16) && (imm16 & (kAAMask | kLKMask)) == 0);
if (imm16 == kInstrSize && !(instr & kLKMask)) {
// Branch to next instr without link.
instr = ORI; // nop: ori, 0,0,0
if (!is_int16(val)) {
PrintF("val = %" V8PRIdPTR ", 0x%" V8PRIxPTR "\n", val, val);
}
- DCHECK(is_int16(val));
+ CHECK(is_int16(val));
} else {
if (!is_uint16(val)) {
PrintF("val = %" V8PRIdPTR ", 0x%" V8PRIxPTR
", is_unsigned_imm16(val)=%d, kImm16Mask=0x%x\n",
val, val, is_uint16(val), kImm16Mask);
}
- DCHECK(is_uint16(val));
+ CHECK(is_uint16(val));
}
emit(instr | rt.code() * B21 | ra.code() * B16 | (kImm16Mask & val));
}
if (lk == SetLK) {
positions_recorder()->WriteRecordedPositions();
}
- DCHECK(is_int16(branch_offset));
- emit(BCX | bo | condition_bit * B16 | (kImm16Mask & branch_offset) | lk);
+ int imm16 = branch_offset;
+ CHECK(is_int16(imm16) && (imm16 & (kAAMask | kLKMask)) == 0);
+ emit(BCX | bo | condition_bit * B16 | (imm16 & kImm16Mask) | lk);
}
if (lk == SetLK) {
positions_recorder()->WriteRecordedPositions();
}
- DCHECK((branch_offset & 3) == 0);
int imm26 = branch_offset;
- DCHECK(is_int26(imm26));
- // todo add AA and LK bits
+ CHECK(is_int26(imm26) && (imm26 & (kAAMask | kLKMask)) == 0);
emit(BX | (imm26 & kImm26Mask) | lk);
}
#if V8_TARGET_ARCH_PPC64
int offset = src.offset();
DCHECK(!src.ra_.is(r0));
- DCHECK(!(offset & 3) && is_int16(offset));
+ CHECK(!(offset & 3) && is_int16(offset));
offset = kImm16Mask & offset;
emit(LD | dst.code() * B21 | src.ra().code() * B16 | offset | 2);
#else
void Assembler::ld(Register rd, const MemOperand& src) {
int offset = src.offset();
DCHECK(!src.ra_.is(r0));
- DCHECK(!(offset & 3) && is_int16(offset));
+ CHECK(!(offset & 3) && is_int16(offset));
offset = kImm16Mask & offset;
emit(LD | rd.code() * B21 | src.ra().code() * B16 | offset);
}
void Assembler::ldu(Register rd, const MemOperand& src) {
int offset = src.offset();
DCHECK(!src.ra_.is(r0));
- DCHECK(!(offset & 3) && is_int16(offset));
+ CHECK(!(offset & 3) && is_int16(offset));
offset = kImm16Mask & offset;
emit(LD | rd.code() * B21 | src.ra().code() * B16 | offset | 1);
}
void Assembler::std(Register rs, const MemOperand& src) {
int offset = src.offset();
DCHECK(!src.ra_.is(r0));
- DCHECK(!(offset & 3) && is_int16(offset));
+ CHECK(!(offset & 3) && is_int16(offset));
offset = kImm16Mask & offset;
emit(STD | rs.code() * B21 | src.ra().code() * B16 | offset);
}
void Assembler::stdu(Register rs, const MemOperand& src) {
int offset = src.offset();
DCHECK(!src.ra_.is(r0));
- DCHECK(!(offset & 3) && is_int16(offset));
+ CHECK(!(offset & 3) && is_int16(offset));
offset = kImm16Mask & offset;
emit(STD | rs.code() * B21 | src.ra().code() * B16 | offset | 1);
}
int offset = src.offset();
Register ra = src.ra();
DCHECK(!ra.is(r0));
- DCHECK(is_int16(offset));
+ CHECK(is_int16(offset));
int imm16 = offset & kImm16Mask;
// could be x_form instruction with some casting magic
emit(LFD | frt.code() * B21 | ra.code() * B16 | imm16);
int offset = src.offset();
Register ra = src.ra();
DCHECK(!ra.is(r0));
- DCHECK(is_int16(offset));
+ CHECK(is_int16(offset));
int imm16 = offset & kImm16Mask;
// could be x_form instruction with some casting magic
emit(LFDU | frt.code() * B21 | ra.code() * B16 | imm16);
void Assembler::lfs(const DoubleRegister frt, const MemOperand& src) {
int offset = src.offset();
Register ra = src.ra();
- DCHECK(is_int16(offset));
+ CHECK(is_int16(offset));
DCHECK(!ra.is(r0));
int imm16 = offset & kImm16Mask;
// could be x_form instruction with some casting magic
void Assembler::lfsu(const DoubleRegister frt, const MemOperand& src) {
int offset = src.offset();
Register ra = src.ra();
- DCHECK(is_int16(offset));
+ CHECK(is_int16(offset));
DCHECK(!ra.is(r0));
int imm16 = offset & kImm16Mask;
// could be x_form instruction with some casting magic
void Assembler::stfd(const DoubleRegister frs, const MemOperand& src) {
int offset = src.offset();
Register ra = src.ra();
- DCHECK(is_int16(offset));
+ CHECK(is_int16(offset));
DCHECK(!ra.is(r0));
int imm16 = offset & kImm16Mask;
// could be x_form instruction with some casting magic
void Assembler::stfdu(const DoubleRegister frs, const MemOperand& src) {
int offset = src.offset();
Register ra = src.ra();
- DCHECK(is_int16(offset));
+ CHECK(is_int16(offset));
DCHECK(!ra.is(r0));
int imm16 = offset & kImm16Mask;
// could be x_form instruction with some casting magic
void Assembler::stfs(const DoubleRegister frs, const MemOperand& src) {
int offset = src.offset();
Register ra = src.ra();
- DCHECK(is_int16(offset));
+ CHECK(is_int16(offset));
DCHECK(!ra.is(r0));
int imm16 = offset & kImm16Mask;
// could be x_form instruction with some casting magic
void Assembler::stfsu(const DoubleRegister frs, const MemOperand& src) {
int offset = src.offset();
Register ra = src.ra();
- DCHECK(is_int16(offset));
+ CHECK(is_int16(offset));
DCHECK(!ra.is(r0));
int imm16 = offset & kImm16Mask;
// could be x_form instruction with some casting magic