(that was the guide linked to by stev47 a couple posts back)
Opps, didn't see that. Still reading over stuff
Sounds good Smile
So, I can't find any actual tutorials, just pages that have snippits of code useful for thosw who already knows what is going on. Even when I look at how targets start out, they instantly jump to having all of the base code done.

I am running through the SystemZ (now removed) target source to get the Z80 target going, although with many large jumps.

Should I/we document everything we do to get this CPU supported and make an actual tutorial from knowing nothing to getting it working?
Quote:
Should I/we document everything we do to get this CPU supported and make an actual tutorial from knowing nothing to getting it working?

Making a proper tutorial can definitely be desirable, but it can consume quite a bit of time...
Perhaps something in-between, by writing down some important notes (non-trivial things, etc.) ?
Lionel Debroux wrote:
Quote:
Should I/we document everything we do to get this CPU supported and make an actual tutorial from knowing nothing to getting it working?

Making a proper tutorial can definitely be desirable, but it can consume quite a bit of time...
Perhaps something in-between, by writing down some important notes (non-trivial things, etc.) ?


I'm with Lionel on this one.
elfprince13 wrote:
Lionel Debroux wrote:
Quote:
Should I/we document everything we do to get this CPU supported and make an actual tutorial from knowing nothing to getting it working?

Making a proper tutorial can definitely be desirable, but it can consume quite a bit of time...
Perhaps something in-between, by writing down some important notes (non-trivial things, etc.) ?


I'm with Lionel on this one.
Sounds good. So long that we don't forget to make an actual one at some point.
Have you been taking notes as you've gone along? Also, any plans to sync your changes with github? I'd love to see what you've been up to.
elfprince13 wrote:
Have you been taking notes as you've gone along? Also, any plans to sync your changes with github? I'd love to see what you've been up to.
AHelper wrote:
What should I do with this?

<edit>

There are about 13,000 changed files from what we currently have in github.
Sync them to github?
elfprince13 wrote:
Sync them to github?
it isn't that simple. I need to just push the other llvm checkout was our branch. Would git like me just deleting all files and adding all of the files?
Git can cope with that, as long as you don't tamper with some of the files in the .git repository at the root Smile
Lionel Debroux wrote:
Git can cope with that, as long as you don't tamper with some of the files in the .git repository at the root Smile
Ah, ok. Are there any .git folders not in the root folder?
Nope, Git and Mercurial keep a single folder at the root, for efficiency reasons. Modern SVN versions (1.7+) do as well.
Note to KermM and self for posterity

Code:
23:18 <@elfprince> An idea strikes me
23:18 <@elfprince> if AHelper0 and I get this llvm target running
23:18 <+KermM> elfprince: Quick, strike it back
23:19 <@elfprince> we should feed the DCS code through the llvm optimizing tools
23:19 <@elfprince> and see if it makes it smaller for you
23:19 < Tari> that requires translating to IR
23:19 <@elfprince> Tari: we should make an assembler anyway
23:19 <@elfprince> which is pretty easy
23:19 <@elfprince> since we have to make an assembly printer
23:20 <@elfprince> and all the instruction data will be in there
23:20 <@elfprince> and it's good to be able to inline assembly in the C code
23:20 < Tari> and a machine translation to IR would probably be strange
23:20 < Tari> might be optimizable, though
23:20 <@elfprince> the only tricky thing would be marking certain buffers or areas as volatile
23:20 <@elfprince> if they're used for interrupts
23:21 <@elfprince> but I bet we could find a way to annotate the code to support that
23:21 <+KermM> That sounds worthwhile to me, good thinking


We could even try the evolutionary algorithms to select best sequence of optimization passes as was done with the llvm backend to ghc.
Taking all MSP430 source files and adding them to the Z80 target. Nothing compiles and I can't fix it as I have no idea what anything is due to a lack of any good explanations.
It was compiling before wasn't it? Might be helpful to post some error logs, or push what was the sort of functioning version up to github so I can take a look at it. As Lionel pointed out, as long as you leave the single metadata folder at the root untouched, everything else can be replaced.
It never compiled, just the near-empty .td files generated .inc files. I will post the errors when I get back to my room. Also, I will try committing. If I do a git push, will it delete all files already in the branch?

edit: wrong word, oops
http://gitready.com/beginner/2009/01/21/pushing-and-pulling.html

[edit]
Yes.
Ok, expect a very long time for the push to work.
Quote:
[ 11%] Built target LLVMSupport
[ 12%] Built target LLVMTableGen
[ 17%] Built target llvm-tblgen
[ 17%] Built target intrinsics_gen
[ 22%] Built target LLVMCore
[ 25%] Built target LLVMObject
[ 31%] Built target LLVMMC
[ 33%] Built target LLVMTarget
[ 41%] Built target LLVMAnalysis
[ 41%] Built target LLVMipa
[ 45%] Built target LLVMTransformUtils
[ 47%] Built target LLVMInstCombine
[ 51%] Built target LLVMScalarOpts
[ 67%] Built target LLVMCodeGen
[ 71%] Built target LLVMSelectionDAG
[ 72%] Built target LLVMMCParser
[ 73%] Built target LLVMAsmPrinter
[ 74%] Built target LLVMBitReader
[ 74%] Built target LLVMBitWriter
[ 77%] Built target LLVMInstrumentation
[ 77%] Built target LLVMVectorize
[ 80%] Built target LLVMipo
[ 81%] Built target LLVMHello
[ 82%] Built target LLVMArchive
[ 83%] Built target LLVMLinker
[ 85%] Built target LLVMMCDisassembler
[ 86%] Built target LLVMDebugInfo
[ 86%] Built target LLVMExecutionEngine
[ 86%] Built target LLVMInterpreter
[ 86%] Built target LLVMRuntimeDyld
[ 86%] Built target LLVMJIT
[ 86%] Built target LLVMMCJIT
[ 86%] Building CXX object lib/Target/Z80/CMakeFiles/LLVMZ80CodeGen.dir/Z80TargetMachine.cpp.o
In file included from /home/HAL/projects/llvm/lib/Target/Z80/Z80TargetMachine.h:18:0,
from /home/HAL/projects/llvm/lib/Target/Z80/Z80TargetMachine.cpp:14:
/home/HAL/projects/llvm/lib/Target/Z80/Z80InstrInfo.h:25:25: error: cannot declare field ‘llvm::Z80InstrInfo::RI’ to be of abstract type ‘llvm::Z80RegisterInfo’
In file included from /home/HAL/projects/llvm/lib/Target/Z80/Z80InstrInfo.h:18:0,
from /home/HAL/projects/llvm/lib/Target/Z80/Z80TargetMachine.h:18,
from /home/HAL/projects/llvm/lib/Target/Z80/Z80TargetMachine.cpp:14:
/home/HAL/projects/llvm/lib/Target/Z80/Z80RegisterInfo.h:25:8: note: because the following virtual functions are pure within ‘llvm::Z80RegisterInfo’:
In file included from /home/HAL/projects/llvm/lib/Target/Z80/Z80RegisterInfo.h:17:0,
from /home/HAL/projects/llvm/lib/Target/Z80/Z80InstrInfo.h:18,
from /home/HAL/projects/llvm/lib/Target/Z80/Z80TargetMachine.h:18,
from /home/HAL/projects/llvm/lib/Target/Z80/Z80TargetMachine.cpp:14:
/home/HAL/projects/llvm/include/llvm/Target/TargetRegisterInfo.h:789:20: note: virtual unsigned int llvm::TargetRegisterInfo::getFrameRegister(const llvm::MachineFunction&) const
/home/HAL/projects/llvm/lib/Target/Z80/Z80TargetMachine.cpp: In function ‘void LLVMInitializeZ80Target()’:
/home/HAL/projects/llvm/lib/Target/Z80/Z80TargetMachine.cpp:24:45: error: ‘TheZ80Target’ was not declared in this scope
/home/HAL/projects/llvm/lib/Target/Z80/Z80TargetMachine.cpp: In constructor ‘llvm::Z80TargetMachine::Z80TargetMachine(const llvm::Target&, llvm::StringRef, llvm::StringRef, llvm::StringRef, const llvm::TargetOptions&, llvm::Reloc::Model, llvm::CodeModel::Model, llvm::CodeGenOpt::Level)’:
/home/HAL/projects/llvm/lib/Target/Z80/Z80TargetMachine.cpp:39:58: error: no matching function for call to ‘llvm::Z80Subtarget::Z80Subtarget(llvm::StringRef&, llvm::StringRef&, llvm::StringRef&)’
/home/HAL/projects/llvm/lib/Target/Z80/Z80TargetMachine.cpp:39:58: note: candidates are:
In file included from /home/HAL/projects/llvm/lib/Target/Z80/Z80FrameLowering.h:18:0,
from /home/HAL/projects/llvm/lib/Target/Z80/Z80TargetMachine.h:20,
from /home/HAL/projects/llvm/lib/Target/Z80/Z80TargetMachine.cpp:14:
/home/HAL/projects/llvm/lib/Target/Z80/Z80Subtarget.h:31:3: note: llvm::Z80Subtarget::Z80Subtarget(const string&, const string&, const string&, bool)
/home/HAL/projects/llvm/lib/Target/Z80/Z80Subtarget.h:31:3: note: candidate expects 4 arguments, 3 provided
/home/HAL/projects/llvm/lib/Target/Z80/Z80Subtarget.h:26:7: note: llvm::Z80Subtarget::Z80Subtarget(const llvm::Z80Subtarget&)
/home/HAL/projects/llvm/lib/Target/Z80/Z80Subtarget.h:26:7: note: candidate expects 1 argument, 3 provided
/home/HAL/projects/llvm/lib/Target/Z80/Z80TargetMachine.cpp: In member function ‘virtual bool {anonymous}::Z80PassConfig::addInstSelector()’:
/home/HAL/projects/llvm/lib/Target/Z80/Z80TargetMachine.cpp:63:64: error: ‘createZ80ISelDag’ was not declared in this scope
/home/HAL/projects/llvm/lib/Target/Z80/Z80TargetMachine.cpp: In member function ‘virtual bool {anonymous}::Z80PassConfig::addPreEmitPass()’:
/home/HAL/projects/llvm/lib/Target/Z80/Z80TargetMachine.cpp:69:40: error: ‘createZ80BranchSelectionPass’ was not declared in this scope
make[2]: *** [lib/Target/Z80/CMakeFiles/LLVMZ80CodeGen.dir/Z80TargetMachine.cpp.o] Error 1
make[1]: *** [lib/Target/Z80/CMakeFiles/LLVMZ80CodeGen.dir/all] Error 2
make: *** [all] Error 2
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 3 of 5
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement