I'm trying to change the Endian of X86 from little to big in the TargetData. I only care about the way in which this effects the LLVM IR, not the actual backend code. I've changed the "e-" to "E-" in X86TargetMachine.cpp (where it sets the DataLayout) with no luck. Are there any other obvious places that I need to change this? The TargetData docs were somewhat helpful but not entirely, if I have missed some obviousness in the docs, I apologize. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120706/27edac0b/attachment.html>
Hello Ryan,> I'm trying to change the Endian of X86 from little to big in the TargetData. > I only care about the way in which this effects the LLVM IR, not the actual > backend code. I've changed the "e-" to "E-" in X86TargetMachine.cpp (where > it sets the DataLayout) with no luck. Are there any other obvious places > that I need to change this?The lowering code in all places might implicitly do little-endian things. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
> Even if I'm only looking at the ir and emit-llvm?Ah, sorry, I misread your email. How you're producing the IR then? -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
> -S -emit-llvm >From what? clang? llvm-gcc? dragonegg?-- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
No luck there with modifying clang/lib/Basic/Targets.cpp unfortunately. I only modified BigEndian to 'true' and Builder.defineMacro to "__BIG_ENDIAN__" On Sat, Jul 7, 2012 at 2:34 AM, Anton Korobeynikov <anton at korobeynikov.info>wrote:> > Oh sorry, clang. > Then you should modify clang, not backends, look into Basic/Targets.cpp > there. > > PS: Note the "Reply All" button in your email client > > -- > With best regards, Anton Korobeynikov > Faculty of Mathematics and Mechanics, Saint Petersburg State University >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120707/5127c9ca/attachment.html>
Anton, I have fixed this, thanks for the help. I missed the subtargets X86_32/64 (the data layout string) in that file and had previously only changed the generic target X86, thanks again. On Sat, Jul 7, 2012 at 11:15 AM, Ryan Taylor <ryta1203 at gmail.com> wrote:> No luck there with modifying clang/lib/Basic/Targets.cpp unfortunately. I > only modified BigEndian to 'true' and Builder.defineMacro to > "__BIG_ENDIAN__" > > > On Sat, Jul 7, 2012 at 2:34 AM, Anton Korobeynikov < > anton at korobeynikov.info> wrote: > >> > Oh sorry, clang. >> Then you should modify clang, not backends, look into Basic/Targets.cpp >> there. >> >> PS: Note the "Reply All" button in your email client >> >> -- >> With best regards, Anton Korobeynikov >> Faculty of Mathematics and Mechanics, Saint Petersburg State University >> > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120709/c94588ae/attachment.html>