Lines Matching full:instruction
39 class Instruction {
44 explicit Instruction(OP op) : op_(op), info_(0) {}
45 Instruction(OP op, unsigned int info) : op_(op), info_(info) {}
51 DISALLOW_COPY_AND_ASSIGN(Instruction);
57 class OriginInstruction : public Instruction {
59 explicit OriginInstruction(RVA rva) : Instruction(ORIGIN, 0), rva_(rva) {}
66 class PeRelocsInstruction : public Instruction {
68 PeRelocsInstruction() : Instruction(MAKEPERELOCS) {}
72 class ElfRelocsInstruction : public Instruction {
74 ElfRelocsInstruction() : Instruction(MAKEELFRELOCS) {}
78 class ElfARMRelocsInstruction : public Instruction {
80 ElfARMRelocsInstruction() : Instruction(MAKEELFARMRELOCS) {}
84 class ByteInstruction : public Instruction {
86 explicit ByteInstruction(uint8 value) : Instruction(DEFBYTE, value) {}
91 class BytesInstruction : public Instruction {
94 : Instruction(DEFBYTES, 0),
105 // A ABS32 to REL32 instruction emits a reference to a label's address.
106 class InstructionWithLabel : public Instruction {
109 : Instruction(op, 0), label_(label) {
117 // An ARM REL32 instruction emits a reference to a label's address and
149 Instruction* instruction = instructions_[i];
150 if (instruction->op() != DEFBYTE) // Will be in byte_instruction_cache_.
151 delete instruction;
224 const Instruction* instruction) const {
225 if (instruction->op() == ABS32)
226 return static_cast<const InstructionWithLabel*>(instruction)->label();
231 const Instruction* instruction) const {
232 if (instruction->op() == REL32 || instruction->op() == REL32ARM) {
234 static_cast<const InstructionWithLabel*>(instruction)->label();
240 CheckBool AssemblyProgram::Emit(Instruction* instruction) {
241 if (!instruction)
243 bool ok = instructions_.push_back(instruction);
245 delete instruction;
406 Instruction* instruction = instructions_[i];
408 switch (instruction->op()) {
410 OriginInstruction* org = static_cast<OriginInstruction*>(instruction);
416 uint8 b = static_cast<ByteInstruction*>(instruction)->byte_value();
423 static_cast<BytesInstruction*>(instruction)->byte_values();
424 uint32 len = static_cast<BytesInstruction*>(instruction)->len();
431 Label* label = static_cast<InstructionWithLabel*>(instruction)->label();
438 static_cast<InstructionWithLabelARM*>(instruction)->label();
440 static_cast<InstructionWithLabelARM*>(instruction)->
447 Label* label = static_cast<InstructionWithLabel*>(instruction)->label();
476 Instruction* AssemblyProgram::GetByteInstruction(uint8 byte) {
478 byte_instruction_cache_.reset(new(std::nothrow) Instruction*[256]);
521 // with the original machine instruction
523 Instruction* instruction = instructions_[i];
524 switch (instruction->op()) {
527 static_cast<InstructionWithLabelARM*>(instruction)->label();
530 static_cast<InstructionWithLabelARM*>(instruction)->arm_op();
532 static_cast<InstructionWithLabelARM*>(instruction)->op_size();