This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG8d3f112f0cdb: [M68k] Update pointer data layout (authored by ricky26).
Changed prior to commit: https://reviews.llvm.org/D108792?vs=368995&id=369064#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108792/new/ https://reviews.llvm.org/D108792 Files: clang/lib/Basic/Targets/M68k.cpp llvm/lib/Target/M68k/M68kTargetMachine.cpp Index: llvm/lib/Target/M68k/M68kTargetMachine.cpp =================================================================== --- llvm/lib/Target/M68k/M68kTargetMachine.cpp +++ llvm/lib/Target/M68k/M68kTargetMachine.cpp @@ -49,10 +49,14 @@ // FIXME how to wire it with the used object format? Ret += "-m:e"; - // M68k pointers are always 32 bit wide even for 16 bit cpus - Ret += "-p:32:32"; - - // M68k requires i8 to align on 2 byte boundry + // M68k pointers are always 32 bit wide even for 16-bit CPUs. + // The ABI only specifies 16-bit alignment. + // On at least the 68020+ with a 32-bit bus, there is a performance benefit + // to having 32-bit alignment. + Ret += "-p:32:16:32"; + + // Bytes do not require special alignment, words are word aligned and + // long words are word aligned at minimum. Ret += "-i8:8:8-i16:16:16-i32:16:32"; // FIXME no floats at the moment Index: clang/lib/Basic/Targets/M68k.cpp =================================================================== --- clang/lib/Basic/Targets/M68k.cpp +++ clang/lib/Basic/Targets/M68k.cpp @@ -37,8 +37,8 @@ // FIXME how to wire it with the used object format? Layout += "-m:e"; - // M68k pointers are always 32 bit wide even for 16 bit cpus - Layout += "-p:32:32"; + // M68k pointers are always 32 bit wide even for 16-bit CPUs + Layout += "-p:32:16:32"; // M68k integer data types Layout += "-i8:8:8-i16:16:16-i32:16:32";
Index: llvm/lib/Target/M68k/M68kTargetMachine.cpp =================================================================== --- llvm/lib/Target/M68k/M68kTargetMachine.cpp +++ llvm/lib/Target/M68k/M68kTargetMachine.cpp @@ -49,10 +49,14 @@ // FIXME how to wire it with the used object format? Ret += "-m:e"; - // M68k pointers are always 32 bit wide even for 16 bit cpus - Ret += "-p:32:32"; - - // M68k requires i8 to align on 2 byte boundry + // M68k pointers are always 32 bit wide even for 16-bit CPUs. + // The ABI only specifies 16-bit alignment. + // On at least the 68020+ with a 32-bit bus, there is a performance benefit + // to having 32-bit alignment. + Ret += "-p:32:16:32"; + + // Bytes do not require special alignment, words are word aligned and + // long words are word aligned at minimum. Ret += "-i8:8:8-i16:16:16-i32:16:32"; // FIXME no floats at the moment Index: clang/lib/Basic/Targets/M68k.cpp =================================================================== --- clang/lib/Basic/Targets/M68k.cpp +++ clang/lib/Basic/Targets/M68k.cpp @@ -37,8 +37,8 @@ // FIXME how to wire it with the used object format? Layout += "-m:e"; - // M68k pointers are always 32 bit wide even for 16 bit cpus - Layout += "-p:32:32"; + // M68k pointers are always 32 bit wide even for 16-bit CPUs + Layout += "-p:32:16:32"; // M68k integer data types Layout += "-i8:8:8-i16:16:16-i32:16:32";
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits