Skip to content
  1. Jul 12, 2012
    • Jack Carter's avatar
      Patch for Mips direct object generation. · 570ae0b1
      Jack Carter authored
      When WriteFragmentData() case FT_align called
      Asm.getBackend().writeNopData() is called, nothing
      is done since Mips implementation of writeNopData just
      returned "true".
      
      For some reason this has not caused problems in 32 bit
      mode, but in 64 bit mode it caused an assert when processing
      multiple function units.
      
      The test case included will assert without this patch. It
      runs twice with different flags to prevent false positives
      due to changes in code generation over time.
      
      llvm-svn: 160084
      570ae0b1
  2. Jul 11, 2012
    • Jack Carter's avatar
      This change removes an "initialization" warning. · 42ebf98b
      Jack Carter authored
      Even though variable in question could not 
      be initialized before use, the code was such that 
      the compiler had no way of knowing that.
      
      llvm-svn: 160081
      42ebf98b
    • Akira Hatanaka's avatar
      In register classes in MipsRegisterInfo.td, list the registers in ascending · bb551915
      Akira Hatanaka authored
      order of binary encoding.
      
      Patch by Vladimir Medic.
      
      llvm-svn: 160073
      bb551915
    • Akira Hatanaka's avatar
      24cf4e36
    • Akira Hatanaka's avatar
      Lower RETURNADDR node in Mips backend. · 878ad8b2
      Akira Hatanaka authored
      Patch by Sasa Stankovic.
      
      llvm-svn: 160031
      878ad8b2
    • Jack Carter's avatar
      Mips specific inline asm operand modifier 'L'. · e8cb2fc6
      Jack Carter authored
         
         Low order register of a double word register operand. Operands 
         are defined by the name of the variable they are marked with in
         the inline assembler code. This is a way to specify that the 
         operand just refers to the low order register for that variable.
         
         It is the opposite of modifier 'D' which specifies the high order
         register.
         
         Example:
         
       main()
      {
      
          long long ll_input = 0x1111222233334444LL;
          long long ll_val = 3;
          int i_result = 0;
      
          __asm__ __volatile__( 
      		   "or	%0, %L1, %2"
      	     : "=r" (i_result) 
      	     : "r" (ll_input), "r" (ll_val)); 
      }
      
         Which results in:
         
         	lui	$2, %hi(_gp_disp)
      	addiu	$2, $2, %lo(_gp_disp)
      	addiu	$sp, $sp, -8
      	addu	$2, $2, $25
      	sw	$2, 0($sp)
      	lui	$2, 13107
      	ori	$3, $2, 17476     <-- Low 32 bits of ll_input
      	lui	$2, 4369
      	ori	$4, $2, 8738      <-- High 32 bits of ll_input
      	addiu	$5, $zero, 3  <-- Low 32 bits of ll_val
      	addiu	$2, $zero, 0  <-- High 32 bits of ll_val
      	#APP
      	or	$3, $4, $5        <-- or i_result, high 32 ll_input, low 32 of ll_val
      	#NO_APP
      	addiu	$sp, $sp, 8
      	jr	$ra
      
      If not direction is done for the long long for 32 bit variables results
      in using the low 32 bits as ll_val shows.
      
      There is an existing bug if 'L' or 'D' is used for the destination register
      for 32 bit long longs in that the target value will be updated incorrectly
      for the non-specified part unless explicitly set within the inline asm code.
      
      llvm-svn: 160028
      e8cb2fc6
  3. Jul 10, 2012
  4. Jul 09, 2012
    • Akira Hatanaka's avatar
      Reapply r158846. · 9bf2b567
      Akira Hatanaka authored
      Access mips register classes via MCRegisterInfo's functions instead of via the
      TargetRegisterClasses defined in MipsGenRegisterInfo.inc.
      
      llvm-svn: 159953
      9bf2b567
  5. Jul 06, 2012
  6. Jul 05, 2012
  7. Jul 03, 2012
  8. Jul 02, 2012
  9. Jun 28, 2012
    • Jack Carter's avatar
      Changed the formatting sequence of a curly brace to · 27747b57
      Jack Carter authored
      the comment per code review feedback.
      
      llvm-svn: 159376
      27747b57
    • Jack Carter's avatar
      The Mips specific inline asm operand modifier 'z' has the · 6c0bc0b3
      Jack Carter authored
      following description in the gnu sources:
      
          Print $0 if operand is zero otherwise print the op normally.
      
      llvm-svn: 159324
      6c0bc0b3
    • Bill Wendling's avatar
      Move lib/Analysis/DebugInfo.cpp to lib/VMCore/DebugInfo.cpp and · e38859dc
      Bill Wendling authored
      include/llvm/Analysis/DebugInfo.h to include/llvm/DebugInfo.h.
      
      The reasoning is because the DebugInfo module is simply an interface to the
      debug info MDNodes and has nothing to do with analysis.
      
      llvm-svn: 159312
      e38859dc
    • Jack Carter's avatar
      This allows hello world to be compiled for Mips 64 direct object. · ef40238a
      Jack Carter authored
      It takes advantage of r159299 which introduces relocation support for N64. 
      elf-dump needed to be upgraded to support N64 relocations as well.
      
      This passes make check.
      
      Jack
      
      llvm-svn: 159302
      ef40238a
    • Jack Carter's avatar
      This allows hello world to be compiled for Mips 64 direct object. · b9f9de93
      Jack Carter authored
      It takes advantage of r159299 which introduces relocation support for N64. 
      elf-dump needed to be upgraded to support N64 relocations as well.
      
      This passes make check.
      
      Jack
      
      llvm-svn: 159301
      b9f9de93
    • Jack Carter's avatar
      The ELF relocation record format is different for N64 · 8ad0c272
      Jack Carter authored
      which many Mips 64 ABIs use than for O64 which many 
      if not all other target ABIs use.
      
      Most architectures have the following 64 bit relocation record format:
      
        typedef struct
        {
          Elf64_Addr   r_offset; /* Address of reference */
          Elf64_Xword  r_info;   /* Symbol index and type of relocation */
        } Elf64_Rel;
      
        typedef struct
        {
          Elf64_Addr    r_offset;
          Elf64_Xword   r_info;
          Elf64_Sxword  r_addend;
        } Elf64_Rela;
      
      Whereas N64 has the following format:
      
        typedef struct
        {
          Elf64_Addr    r_offset;/* Address of reference */
          Elf64_Word  r_sym;     /* Symbol index */
          Elf64_Byte  r_ssym;    /* Special symbol */
          Elf64_Byte  r_type3;   /* Relocation type */
          Elf64_Byte  r_type2;   /* Relocation type */
          Elf64_Byte  r_type;    /* Relocation type */
        } Elf64_Rel;
      
        typedef struct
        {
          Elf64_Addr    r_offset;/* Address of reference */
          Elf64_Word  r_sym;     /* Symbol index */
          Elf64_Byte  r_ssym;    /* Special symbol */
          Elf64_Byte  r_type3;   /* Relocation type */
          Elf64_Byte  r_type2;   /* Relocation type */
          Elf64_Byte  r_type;    /* Relocation type */
          Elf64_Sxword  r_addend;
        } Elf64_Rela;
      
      The structure is the same size, but the r_info data element 
      is now 5 separate elements. Besides the content aspects, 
      endian byte reordering will be different for the area with 
      each element being endianized separately.
      
      I treat this as generic and continue to pass r_type as 
      an integer masking and unmasking the byte sized N64 
      values for N64 mode. I've implemented this and it causes no 
      affect on other current targets.
      
      This passes make check.
      
      Jack
      
      llvm-svn: 159299
      8ad0c272
  10. Jun 27, 2012
  11. Jun 24, 2012
  12. Jun 21, 2012
    • Akira Hatanaka's avatar
      1. fix null program output after some other changes · 765c3123
      Akira Hatanaka authored
      2. re-enable null.ll test
      3. fix some minor style violations
      
      Patch by Reed Kotler.
      
      llvm-svn: 158935
      765c3123
    • Jack Carter's avatar
      The inline asm operand modifier 'c' is suppose · b2fd5f66
      Jack Carter authored
      to be generic across architectures. It has the
      following description in the gnu sources:
      
          Substitute immediate value without immediate syntax
      
      Several Architectures such as x86 have local implementations
      of operand modifier 'c' which go beyond the above description
      slightly. To make use of the generic modifiers without overriding
      local implementation one can make a call to the base class method
      for AsmPrinter::PrintAsmOperand() in the locally derived method's 
      "default" case in the switch statement. That way if it is already
      defined locally the generic version will never get called.
      
      This change is needed when test/CodeGen/generic/asm-large-immediate.ll
      failed on a native Mips board. The test was assuming a generic
      implementation was in place.
      
      Affected files:
      
          lib/Target/Mips/MipsAsmPrinter.cpp:
              Changed the default case to call the base method.
          lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
              Added 'c' to the switch cases.
          test/CodeGen/Mips/asm-large-immediate.ll
              Mips compiled version of the generic one
      
      Contributer: Jack Carter
      llvm-svn: 158925
      b2fd5f66
  13. Jun 20, 2012
  14. Jun 19, 2012
  15. Jun 16, 2012
  16. Jun 14, 2012
Loading