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

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

Issue 2667203002: s390: fix ri-c format for brc (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 529
530 constant = target_pos - pc_offset(); 530 constant = target_pos - pc_offset();
531 } 531 }
532 llilf(r1, Operand(constant)); 532 llilf(r1, Operand(constant));
533 } 533 }
534 534
535 // Pseudo op - branch on condition 535 // Pseudo op - branch on condition
536 void Assembler::branchOnCond(Condition c, int branch_offset, bool is_bound) { 536 void Assembler::branchOnCond(Condition c, int branch_offset, bool is_bound) {
537 int offset_in_halfwords = branch_offset / 2; 537 int offset_in_halfwords = branch_offset / 2;
538 if (is_bound && is_int16(offset_in_halfwords)) { 538 if (is_bound && is_int16(offset_in_halfwords)) {
539 brc(c, Operand(offset_in_halfwords & 0xFFFF)); // short jump 539 brc(c, Operand(offset_in_halfwords)); // short jump
540 } else { 540 } else {
541 brcl(c, Operand(offset_in_halfwords)); // long jump 541 brcl(c, Operand(offset_in_halfwords)); // long jump
542 } 542 }
543 } 543 }
544 544
545 // 32-bit Store Multiple - short displacement (12-bits unsigned) 545 // 32-bit Store Multiple - short displacement (12-bits unsigned)
546 void Assembler::stm(Register r1, Register r2, const MemOperand& src) { 546 void Assembler::stm(Register r1, Register r2, const MemOperand& src) {
547 rs_form(STM, r1, r2, src.rb(), src.offset()); 547 rs_form(STM, r1, r2, src.rb(), src.offset());
548 } 548 }
549 549
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 // +--------+----+----+------------------+ 640 // +--------+----+----+------------------+
641 // | OpCode | M1 |OpCd| I2 | 641 // | OpCode | M1 |OpCd| I2 |
642 // +--------+----+----+------------------+ 642 // +--------+----+----+------------------+
643 // 0 8 12 16 31 643 // 0 8 12 16 31
644 #define RI2_FORM_EMIT(name, op) \ 644 #define RI2_FORM_EMIT(name, op) \
645 void Assembler::name(Condition m, const Operand& i2) { ri_form(op, m, i2); } 645 void Assembler::name(Condition m, const Operand& i2) { ri_form(op, m, i2); }
646 646
647 void Assembler::ri_form(Opcode op, Condition m1, const Operand& i2) { 647 void Assembler::ri_form(Opcode op, Condition m1, const Operand& i2) {
648 DCHECK(is_uint12(op)); 648 DCHECK(is_uint12(op));
649 DCHECK(is_uint4(m1)); 649 DCHECK(is_uint4(m1));
650 DCHECK(is_uint16(i2.imm_)); 650 DCHECK(op == BRC ? is_int16(i2.imm_) : is_uint16(i2.imm_));
651 emit4bytes((op & 0xFF0) * B20 | m1 * B20 | (op & 0xF) * B16 | 651 emit4bytes((op & 0xFF0) * B20 | m1 * B20 | (op & 0xF) * B16 |
652 (i2.imm_ & 0xFFFF)); 652 (i2.imm_ & 0xFFFF));
653 } 653 }
654 654
655 // RIE-f format: <insn> R1,R2,I3,I4,I5 655 // RIE-f format: <insn> R1,R2,I3,I4,I5
656 // +--------+----+----+------------------+--------+--------+ 656 // +--------+----+----+------------------+--------+--------+
657 // | OpCode | R1 | R2 | I3 | I4 | I5 | OpCode | 657 // | OpCode | R1 | R2 | I3 | I4 | I5 | OpCode |
658 // +--------+----+----+------------------+--------+--------+ 658 // +--------+----+----+------------------+--------+--------+
659 // 0 8 12 16 24 32 40 47 659 // 0 8 12 16 24 32 40 47
660 void Assembler::rie_f_form(Opcode op, Register r1, Register r2, 660 void Assembler::rie_f_form(Opcode op, Register r1, Register r2,
(...skipping 1979 matching lines...) Expand 10 before | Expand all | Expand 10 after
2640 SKIP_ICACHE_FLUSH); 2640 SKIP_ICACHE_FLUSH);
2641 } 2641 }
2642 2642
2643 reloc_info_writer.Write(&rinfo); 2643 reloc_info_writer.Write(&rinfo);
2644 } 2644 }
2645 } 2645 }
2646 2646
2647 } // namespace internal 2647 } // namespace internal
2648 } // namespace v8 2648 } // namespace v8
2649 #endif // V8_TARGET_ARCH_S390 2649 #endif // V8_TARGET_ARCH_S390
OLDNEW
« 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