Class: Voodoo::MIPSELFGenerator
- Inherits:
-
MIPSGasGenerator
- Object
- CommonCodeGenerator
- MIPSGasGenerator
- Voodoo::MIPSELFGenerator
- Defined in:
- lib/voodoo/generators/mips_elf_generator.rb
Overview
Generator that produces ELF objects for mips and mipsel
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ MIPSELFGenerator
constructor
A new instance of MIPSELFGenerator.
- #output_file_name(input_name) ⇒ Object
- #output_file_suffix ⇒ Object
- #write(io) ⇒ Object
Methods inherited from MIPSGasGenerator
#addiu, #arg_offset, #arg_reference, #arg_register, #auto_bytes, #auto_words, #begin_block, #begin_function, #byte, #call, #comment, #common_if, #create_frame, #emit_align, #emit_export, #emit_function_prologue, #emit_import, #emit_label_size, #emit_label_type, #emit_load_word, #emit_store_word, #end_block, #end_function, #end_if, #eval_binop, #eval_expr, #get_byte, #get_word, #goto, #grow_stack, #ifelse, #ifeq, #ifge, #ifgt, #ifle, #iflt, #ifne, #let, #load_at, #load_value, #load_value_into_register, #local_offset, #local_reference, #local_register, #max_locals, #offset_reference, #register_local?, #ret, #save_frame, #set, #set_byte, #set_word, #string, #tail_call, #word
Methods inherited from CommonCodeGenerator
#add, #add_function, #align, #assymetric_binop?, #at_expr?, #binop?, #block, #count_locals, #default_alignment, #each_statement, #emit, #emit_label, #emit_voodoo, #export, #features, #function, #gensym, #global?, #has_feature?, #import, #in_section, #integer?, #label, #local_register, #number_of_register_arguments, #number_of_stack_arguments, #real_section_name, #register?, #register_arg?, #registers_for_locals, #restore_frame, #restore_locals, #restore_registers_from_frame, #save_frame, #save_frame_and_locals, #save_locals, #save_registers_to_frame, #saved_frame_size, #section, #section=, #section_alias, #stack_align, #substitute_number, #substitution?, #symbol?, #symmetric_binop?, #undefined_symbols, #with_temporaries, #with_temporary
Constructor Details
#initialize(params = {}) ⇒ MIPSELFGenerator
Returns a new instance of MIPSELFGenerator.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/voodoo/generators/mips_elf_generator.rb', line 9 def initialize params = {} @asmgenerator = MIPSGasGenerator.new params super(@asmgenerator) case params[:architecture] when :mips byte_order = ' -EB' when :mipsel byte_order = ' -EL' else byte_order = '' end opts = '-KPIC' + byte_order @elfgenerator = GasELFGenerator.new @asmgenerator, opts end |
Instance Method Details
#output_file_name(input_name) ⇒ Object
24 25 26 |
# File 'lib/voodoo/generators/mips_elf_generator.rb', line 24 def output_file_name input_name @elfgenerator.output_file_name input_name end |
#output_file_suffix ⇒ Object
28 29 30 |
# File 'lib/voodoo/generators/mips_elf_generator.rb', line 28 def output_file_suffix @elfgenerator.output_file_suffix end |
#write(io) ⇒ Object
32 33 34 |
# File 'lib/voodoo/generators/mips_elf_generator.rb', line 32 def write io @elfgenerator.write io end |