This is an archive of the discontinued LLVM Phabricator instance.

Target: Add the midipix target
Needs ReviewPublic

Authored by martell on Feb 24 2017, 4:53 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Adds the midipix target for windows hosts.

Diff Detail

Event Timeline

martell updated this revision to Diff 89648.Feb 24 2017, 4:53 AM
martell created this revision.

add context

Needs feedback from midipix.
I have left a few notes.

include/llvm/ADT/Triple.h
536

Should we have a separate value called isOSMidipix() instead incase we support other hosts with a middle posix layer such as OSX, BSD, Consoles etc.

lib/Analysis/TargetLibraryInfo.cpp
145

Are these lib functions available midipix even though not on cygwin or mingw?

lib/Support/Triple.cpp
896

LLVM has a 4 part triplet, crazy I know.
x86_64-midipix-windows-midipix or i686-midipix-windows-midipix
or
x86_64-windows-midipix and i686-windows-midipix without the vendor part.

Example of mingw is x86_64-pc-windows-gnu which converts as x86_64-pc-mingw32
This gives us room to have x86_64-darwin-midipix in future etc.

Comments?

lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
62

Not sure what is going on here?
It falls back to the same flavor

176

We might have to add a new flavor similar to X86MCAsmInfoGNUCOFFcalled X86MCAsmInfoMIDIPIXCOFF where support for .got is added.
Will need feedback from llvm devs on if we can just use X86MCAsmInfoGNUCOFF

lib/Target/X86/X86FrameLowering.cpp
724

Do we just use alloca on midipix and never chkstk?

lib/Target/X86/X86ISelDAGToDAG.cpp
657

I assume we still need to emit the __main special code for this target?

lib/Target/X86/X86ISelLowering.cpp
461

Is the lowering the same as mingw here?

2825

Same as above for the main vs __main hook

lib/Target/X86/X86Subtarget.h
547

Same as above, should we convert into 2 functions?

tools/lli/lli.cpp
539

Again handler for __main hooking