LLVM backend for 6502
Go to file
Jack Carter 93ee286e8d The ELF relocation record format is different for N64
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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159299 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-27 22:28:30 +00:00
autoconf Remove the PTX back-end and all of its artifacts (triple, etc.) 2012-05-24 21:38:21 +00:00
bindings [python] Add negative MemoryBuffer testcase 2012-03-22 11:23:52 +00:00
cmake LLVMProcessSources.cmake: [MSVC] Don't add "PROPERTIES HEADER_FILE_ONLY" to *.def. 2012-06-24 03:50:58 +00:00
docs Sphinxify the exception handling doc. 2012-06-27 07:20:57 +00:00
examples Remove trailing whitespaces 2012-06-21 22:26:01 +00:00
include The ELF relocation record format is different for N64 2012-06-27 22:28:30 +00:00
lib The ELF relocation record format is different for N64 2012-06-27 22:28:30 +00:00
projects Exclude both libcxx and compiler-rt until we get their CMake builds 2012-06-27 00:30:08 +00:00
runtime Free the allocated filename. Found by clang static analyzer. 2012-06-15 09:11:47 +00:00
test Revert r159136 due to PR13124. 2012-06-27 17:10:33 +00:00
tools When users ask for -mcpu=help or -mattr=help, just output the help without 2012-06-27 16:23:48 +00:00
unittests IntegersSubsetTest: Due to compilation failure with -std=c11, replaced -1UL with NOT_A_NUMBER constant (0xffff). 2012-06-26 16:08:20 +00:00
utils Refactor and speed up DFA generator. 2012-06-27 19:38:29 +00:00
.gitignore Add tools/lld to .gitignore. 2012-05-02 21:25:32 +00:00
CMakeLists.txt New test tool: obj2yaml 2012-06-19 18:02:35 +00:00
configure Remove the PTX back-end and all of its artifacts (triple, etc.) 2012-05-24 21:38:21 +00:00
CREDITS.TXT Alphabetize. 2012-06-19 23:47:58 +00:00
LICENSE.TXT Add YAML parser to Support. 2012-04-03 23:09:22 +00:00
llvm.spec.in
LLVMBuild.txt
Makefile Do not install llvm-config-host for cross-builds of clang. rdar://11317847 2012-05-09 00:07:02 +00:00
Makefile.common [docs] Remove unsupported references to ExtraSource variable. 2012-05-15 21:32:27 +00:00
Makefile.config.in - Added ExecutionEngine/MCJIT tests 2012-05-17 21:07:47 +00:00
Makefile.rules llvm-ld does not exist anymore, use llvm-link instead. 2012-05-23 20:34:19 +00:00
README.txt Testing commit access 2012-05-24 14:20:13 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the HTML documentation provided in docs/index.html for further
assistance with LLVM.

If you're writing a package for LLVM, see docs/Packaging.html for our
suggestions.