5e693ed07b 
								
							 
						 
						
							
							
								
								Rip all of the global variable lowering logic out of TargetAsmInfo.  Since  
							
							... 
							
							
							
							it is highly specific to the object file that will be generated in the end,
this introduces a new TargetLoweringObjectFile interface that is implemented
for each of ELF/MachO/COFF/Alpha/PIC16 and XCore.
Though still is still a brutal and ugly refactoring, this is a major step
towards goodness.
This patch also:
1. fixes a bunch of dangling pointer problems in the PIC16 backend.
2. disables the TargetLowering copy ctor which PIC16 was accidentally using.
3. gets us closer to xcore having its own crazy target section flags and
   pic16 not having to shadow sections with its own objects.
4. fixes wierdness where ELF targets would set CStringSection but not
   CStringSection_.  Factor the code better.
5. fixes some bugs in string lowering on ELF targets.
llvm-svn: 77294 
							
						 
						
							2009-07-28 03:13:23 +00:00  
				
					
						
							
							
								 
						
							
								86b7255776 
								
							 
						 
						
							
							
								
								Eliminate getNamed/getUnnamedSection, adding a new and unified getOrCreateSection  
							
							... 
							
							
							
							instead.
llvm-svn: 77186 
							
						 
						
							2009-07-27 06:17:14 +00:00  
				
					
						
							
							
								 
						
							
								149465ea06 
								
							 
						 
						
							
							
								
								Eliminate SectionFlags, just embed a SectionKind into Section  
							
							... 
							
							
							
							instead and drive things based off of that.
llvm-svn: 77184 
							
						 
						
							2009-07-27 05:32:16 +00:00  
				
					
						
							
							
								 
						
							
								602d44fa70 
								
							 
						 
						
							
							
								
								untangle a TargetAsmInfo hack where ELFTargetAsmInfo would create a  
							
							... 
							
							
							
							'unnamed' bss section, but some impls would want a named one.  Since
they don't have consistent behavior, just make each target do their
own thing, instead of doing something "sortof common" then having
targets change immutable objects later.
llvm-svn: 77165 
							
						 
						
							2009-07-26 19:23:28 +00:00  
				
					
						
							
							
								 
						
							
								22c2fba978 
								
							 
						 
						
							
							
								
								Use common code for both ARM and Thumb-2 instruction and register info.  
							
							... 
							
							
							
							llvm-svn: 75067 
							
						 
						
							2009-07-08 23:10:31 +00:00  
				
					
						
							
							
								 
						
							
								99152f3a2c 
								
							 
						 
						
							
							
								
								Split thumb-related stuff into separate classes.  
							
							... 
							
							
							
							Step 1: ARMInstructionInfo => {ARM,Thumb}InstructionInfo
llvm-svn: 74329 
							
						 
						
							2009-06-26 21:28:53 +00:00  
				
					
						
							
							
								 
						
							
								33f4eb462f 
								
							 
						 
						
							
							
								
								Move up dwarf writer initialization in common AsmPrinter class.  
							
							... 
							
							
							
							llvm-svn: 73784 
							
						 
						
							2009-06-19 21:54:26 +00:00  
				
					
						
							
							
								 
						
							
								8284b66264 
								
							 
						 
						
							
							
								
								merge the common darwin settings from the X86/PPC/ARM targets  
							
							... 
							
							
							
							into DarwinTargetAsmInfo.cpp.  The remaining differences should
be evaluated.  It seems strange that x86/arm has .zerofill but ppc
doesn't, etc.
llvm-svn: 73742 
							
						 
						
							2009-06-19 00:08:39 +00:00  
				
					
						
							
							
								 
						
							
								b84764516d 
								
							 
						 
						
							
							
								
								move mangler quote handling from asm printers to TargetAsmInfo.  
							
							... 
							
							
							
							llvm-svn: 73738 
							
						 
						
							2009-06-18 23:41:35 +00:00  
				
					
						
							
							
								 
						
							
								09081b25a5 
								
							 
						 
						
							
							
								
								simplify macro debug info directive handling.  
							
							... 
							
							
							
							llvm-svn: 73736 
							
						 
						
							2009-06-18 23:31:37 +00:00  
				
					
						
							
							
								 
						
							
								de9e36a74e 
								
							 
						 
						
							
							
								
								On Darwin, ams printer should output a second label before a jump table so the linker knows it's a new atom. But this is only needed if the jump table is put in a separate section from the function body.  
							
							... 
							
							
							
							llvm-svn: 73720 
							
						 
						
							2009-06-18 20:37:15 +00:00  
				
					
						
							
							
								 
						
							
								93e87652f2 
								
							 
						 
						
							
							
								
								fix PR3785, a valgrind error on test/CodeGen/ARM/pr3502.ll  
							
							... 
							
							
							
							llvm-svn: 66660 
							
						 
						
							2009-03-11 16:14:25 +00:00  
				
					
						
							
							
								 
						
							
								ab85feb91c 
								
							 
						 
						
							
							
								
								Clean up some ARM GV asm printing out; minor fixes to match what gcc does.  
							
							... 
							
							
							
							llvm-svn: 60621 
							
						 
						
							2008-12-06 02:00:55 +00:00  
				
					
						
							
							
								 
						
							
								cda011b5ad 
								
							 
						 
						
							
							
								
								Fix bug 3140.  
							
							... 
							
							
							
							Print a single parameter .file directive if we have an ELF target.
llvm-svn: 60480 
							
						 
						
							2008-12-03 11:01:37 +00:00  
				
					
						
							
							
								 
						
							
								ac41d9f5d8 
								
							 
						 
						
							
							
								
								Refactor various TargetAsmInfo subclasses' TargetMachine members away  
							
							... 
							
							
							
							adding a TargetMachine member to the base TargetAsmInfo class instead.
llvm-svn: 58624 
							
						 
						
							2008-11-03 18:22:42 +00:00  
				
					
						
							
							
								 
						
							
								d2aded08ac 
								
							 
						 
						
							
							
								
								Fix weird think-o and unbreak build on all gcc-3.4.x-based platforms (e.g. mingw)  
							
							... 
							
							
							
							llvm-svn: 57106 
							
						 
						
							2008-10-05 08:53:29 +00:00  
				
					
						
							
							
								 
						
							
								87001fd6fd 
								
							 
						 
						
							
							
								
								Reapply 56585:56589 with proper fix for some gcc versions  
							
							... 
							
							
							
							llvm-svn: 56621 
							
						 
						
							2008-09-25 21:00:33 +00:00  
				
					
						
							
							
								 
						
							
								84301390ae 
								
							 
						 
						
							
							
								
								Temporarily backing out 56585:56589 to unbreak the build.  
							
							... 
							
							
							
							llvm-svn: 56607 
							
						 
						
							2008-09-25 07:38:08 +00:00  
				
					
						
							
							
								 
						
							
								a9163feefe 
								
							 
						 
						
							
							
								
								Get rid of virtual inheritance for ARM TAI  
							
							... 
							
							
							
							llvm-svn: 56587 
							
						 
						
							2008-09-24 22:22:27 +00:00  
				
					
						
							
							
								 
						
							
								8e7b93938d 
								
							 
						 
						
							
							
								
								Get rid of ReadOnlySection duplicate  
							
							... 
							
							
							
							llvm-svn: 56582 
							
						 
						
							2008-09-24 22:20:27 +00:00  
				
					
						
							
							
								 
						
							
								5906234c1d 
								
							 
						 
						
							
							
								
								Get rid of now unused {Four,Eight,Sixteen}ByteConstantSection  
							
							... 
							
							
							
							llvm-svn: 56580 
							
						 
						
							2008-09-24 22:18:54 +00:00  
				
					
						
							
							
								 
						
							
								22db30548d 
								
							 
						 
						
							
							
								
								Get rid of duplicate char*/Section* stuff for TLS sections  
							
							... 
							
							
							
							llvm-svn: 56577 
							
						 
						
							2008-09-24 22:17:06 +00:00  
				
					
						
							
							
								 
						
							
								7497762606 
								
							 
						 
						
							
							
								
								Get rid of duplicate char*/Section* DataSection  
							
							... 
							
							
							
							llvm-svn: 56575 
							
						 
						
							2008-09-24 22:16:16 +00:00  
				
					
						
							
							
								 
						
							
								f080225490 
								
							 
						 
						
							
							
								
								Fix logic for not emitting no-dead-strip for some  
							
							... 
							
							
							
							objects in llvm.used (thanks Anton).  Makes visible
the magic 'l' prefix for symbols on Darwin which are
to be passed through the assembler, then removed at
linktime (previously all references to this had been
hidden in the ObjC FE code, oh well).
llvm-svn: 55973 
							
						 
						
							2008-09-09 01:21:22 +00:00  
				
					
						
							
							
								 
						
							
								04083529df 
								
							 
						 
						
							
							
								
								Switch ARM to new section handling stuff  
							
							... 
							
							
							
							llvm-svn: 54458 
							
						 
						
							2008-08-07 09:54:23 +00:00  
				
					
						
							
							
								 
						
							
								355b74acc2 
								
							 
						 
						
							
							
								
								Add StringConstantPrefix to control what the  
							
							... 
							
							
							
							assembler names of string constants look like.
llvm-svn: 51909 
							
						 
						
							2008-06-03 18:09:06 +00:00  
				
					
						
							
							
								 
						
							
								bdc24adaaf 
								
							 
						 
						
							
							
								
								A quick nm audit turned up several fixed tables and objects that were  
							
							... 
							
							
							
							marked read-write. Use const so that they can be allocated in a
read-only segment.
llvm-svn: 48800 
							
						 
						
							2008-03-25 21:45:14 +00:00  
				
					
						
							
							
								 
						
							
								50b536eef9 
								
							 
						 
						
							
							
								
								Add \t after .set. Fix by Jay Freeman.  
							
							... 
							
							
							
							llvm-svn: 48753 
							
						 
						
							2008-03-24 23:36:49 +00:00  
				
					
						
							
							
								 
						
							
								f3ebc3f3d2 
								
							 
						 
						
							
							
								
								Remove attribution from file headers, per discussion on llvmdev.  
							
							... 
							
							
							
							llvm-svn: 45418 
							
						 
						
							2007-12-29 20:36:04 +00:00  
				
					
						
							
							
								 
						
							
								65e804a9c3 
								
							 
						 
						
							
							
								
								Support non-POSIX hosts by removing use of strncasecmp.  
							
							... 
							
							
							
							llvm-svn: 43364 
							
						 
						
							2007-10-25 21:54:43 +00:00  
				
					
						
							
							
								 
						
							
								66c22e8fd6 
								
							 
						 
						
							
							
								
								Enable indirect encoding for the personality function  
							
							... 
							
							
							
							llvm-svn: 41873 
							
						 
						
							2007-09-11 23:55:40 +00:00  
				
					
						
							
							
								 
						
							
								c7ebbaa10e 
								
							 
						 
						
							
							
								
								Define AsmTransCBE for ARM.  
							
							... 
							
							
							
							llvm-svn: 37527 
							
						 
						
							2007-06-08 21:06:23 +00:00  
				
					
						
							
							
								 
						
							
								3551928a2b 
								
							 
						 
						
							
							
								
								Enable aliases on arm-linux.  
							
							... 
							
							
							
							llvm-svn: 37042 
							
						 
						
							2007-05-14 18:32:56 +00:00  
				
					
						
							
							
								 
						
							
								83930198dd 
								
							 
						 
						
							
							
								
								Debug support for arm-linux.  
							
							... 
							
							
							
							Patch by Raul Herbster.
llvm-svn: 36690 
							
						 
						
							2007-05-03 20:28:35 +00:00  
				
					
						
							
							
								 
						
							
								9ce17f1e33 
								
							 
						 
						
							
							
								
								Add some support for (Darwin) code-generating directives in getInlineAsmLength.  
							
							... 
							
							
							
							Support is incomplete, but more accurate than gcc's.
llvm-svn: 36634 
							
						 
						
							2007-05-02 01:02:40 +00:00  
				
					
						
							
							
								 
						
							
								71577f3848 
								
							 
						 
						
							
							
								
								remove unused variable  
							
							... 
							
							
							
							llvm-svn: 36585 
							
						 
						
							2007-04-30 00:30:48 +00:00  
				
					
						
							
							
								 
						
							
								2c673ad7ef 
								
							 
						 
						
							
							
								
								Enable protected visibility on ARM.  
							
							... 
							
							
							
							llvm-svn: 36583 
							
						 
						
							2007-04-30 00:23:51 +00:00  
				
					
						
							
							
								 
						
							
								1ee29dd026 
								
							 
						 
						
							
							
								
								Make ARM-specific version of getInlineAsmLength  
							
							... 
							
							
							
							llvm-svn: 36572 
							
						 
						
							2007-04-29 19:17:45 +00:00  
				
					
						
							
							
								 
						
							
								c39c12a3fa 
								
							 
						 
						
							
							
								
								ARM TLS: implement "general dynamic", "initial exec" and "local exec" models.  
							
							... 
							
							
							
							llvm-svn: 36506 
							
						 
						
							2007-04-27 13:54:47 +00:00  
				
					
						
							
							
								 
						
							
								8eb9bff493 
								
							 
						 
						
							
							
								
								add isThumb (unused as yet)  
							
							... 
							
							
							
							llvm-svn: 36370 
							
						 
						
							2007-04-23 20:04:35 +00:00  
				
					
						
							
							
								 
						
							
								d918477ac3 
								
							 
						 
						
							
							
								
								For Darwin, put constant data into .const, .const_data, .literal{4|8|16}  
							
							... 
							
							
							
							sections.
llvm-svn: 35017 
							
						 
						
							2007-03-08 01:25:25 +00:00  
				
					
						
							
							
								 
						
							
								f10769dda7 
								
							 
						 
						
							
							
								
								Use init_array/fini_array sections for static contructors/destructors when the ABI is AAPCS.  
							
							... 
							
							
							
							Fix SingleSource/Regression/C/ConstructorDestructorAttributes test on arm-linux-gnueabi.
llvm-svn: 34931 
							
						 
						
							2007-03-05 17:59:58 +00:00  
				
					
						
							
							
								 
						
							
								2c355da986 
								
							 
						 
						
							
							
								
								Define PrivateGlobalPrefix for ARM Linux. (Fix CodeGen/ARM/large_stack.ll)  
							
							... 
							
							
							
							llvm-svn: 33763 
							
						 
						
							2007-02-01 21:43:53 +00:00  
				
					
						
							
							
								 
						
							
								0e083d0161 
								
							 
						 
						
							
							
								
								Darwin -static should codegen static ctors / dtors to .constructor / .destructor sections.  
							
							... 
							
							
							
							llvm-svn: 33657 
							
						 
						
							2007-01-30 08:04:53 +00:00  
				
					
						
							
							
								 
						
							
								7d47719af0 
								
							 
						 
						
							
							
								
								Some asm directives fixes for ELF.  
							
							... 
							
							
							
							Now we can compile llvm-gcc on arm-linux-gnueabi!
llvm-svn: 33558 
							
						 
						
							2007-01-26 23:24:43 +00:00  
				
					
						
							
							
								 
						
							
								d45cd5eb81 
								
							 
						 
						
							
							
								
								Fix Data16bitsDirective for ELF.  
							
							... 
							
							
							
							llvm-svn: 33549 
							
						 
						
							2007-01-26 21:20:45 +00:00  
				
					
						
							
							
								 
						
							
								2cfbcce102 
								
							 
						 
						
							
							
								
								Darwin HiddenDirective is .private_extern.  
							
							... 
							
							
							
							llvm-svn: 33465 
							
						 
						
							2007-01-23 19:06:03 +00:00  
				
					
						
							
							
								 
						
							
								023c7d667d 
								
							 
						 
						
							
							
								
								Darwin doesn't support .bss, but it does have .zerofill  
							
							... 
							
							
							
							llvm-svn: 33364 
							
						 
						
							2007-01-19 19:23:47 +00:00  
				
					
						
							
							
								 
						
							
								df62250cee 
								
							 
						 
						
							
							
								
								Modify emission of jump tables on darwin to emit an extra "l" label that  
							
							... 
							
							
							
							delimits the boundaries of jump tables.  This lets the linker's dead code
stripping optimization do a better job.
llvm-svn: 33362 
							
						 
						
							2007-01-19 18:59:56 +00:00  
				
					
						
							
							
								 
						
							
								10043e215b 
								
							 
						 
						
							
							
								
								ARM backend contribution from Apple.  
							
							... 
							
							
							
							llvm-svn: 33353 
							
						 
						
							2007-01-19 07:51:42 +00:00