6b4391aa69 
								
							 
						 
						
							
							
								
								MC/Mach-O: Silently ignore .file directives instead of error'ing out on  
							
							... 
							
							
							
							them. They aren't important enough to abort the entire assembly, and failing
early makes testing more annoying.
llvm-svn: 108747 
							
						 
						
							2010-07-19 20:44:20 +00:00  
				
					
						
							
							
								 
						
							
								e2da0a478d 
								
							 
						 
						
							
							
								
								MC: Add WinCOFFStreamer implementation and merge common code from MachO  
							
							... 
							
							
							
							into MCObjectStreamer.
Origonal Windows COFF implementation by Nathan Jedffords.
llvm-svn: 108678 
							
						 
						
							2010-07-19 06:13:10 +00:00  
				
					
						
							
							
								 
						
							
								082d0fd7ad 
								
							 
						 
						
							
							
								
								Added the darwin .weak_def_can_be_hidden directive.  
							
							... 
							
							
							
							llvm-svn: 107886 
							
						 
						
							2010-07-08 17:22:42 +00:00  
				
					
						
							
							
								 
						
							
								ede8e6d2f0 
								
							 
						 
						
							
							
								
								MC/Mach-O: Rewrite atom association to be a final pass we do in Finish(), instead of tracking as part of emission.  
							
							... 
							
							
							
							- This allows sharing more code with the MCObjectStreamer.
llvm-svn: 106143 
							
						 
						
							2010-06-16 20:04:32 +00:00  
				
					
						
							
							
								 
						
							
								aa627c39e4 
								
							 
						 
						
							
							
								
								MC: Simplify MCAssembler::isSymbolLinkerVisible to only take an MCSymbol.  
							
							... 
							
							
							
							llvm-svn: 106142 
							
						 
						
							2010-06-16 20:04:29 +00:00  
				
					
						
							
							
								 
						
							
								b2347fe504 
								
							 
						 
						
							
							
								
								MC: Lift SwitchSection() and Finish() into MCObjectStreamer.  
							
							... 
							
							
							
							llvm-svn: 106141 
							
						 
						
							2010-06-16 20:04:25 +00:00  
				
					
						
							
							
								 
						
							
								8a3c9d9bc4 
								
							 
						 
						
							
							
								
								MC: Factor out an MCObjectStreamer class, which will be shared by the concrete  
							
							... 
							
							
							
							object file format writers.
llvm-svn: 106140 
							
						 
						
							2010-06-16 20:04:22 +00:00  
				
					
						
							
							
								 
						
							
								b889fc987e 
								
							 
						 
						
							
							
								
								MC: When running with -mc-relax-all, we can eagerly relax instructions and avoid creating unnecessary MCInstFragments.  
							
							... 
							
							
							
							llvm-svn: 104736 
							
						 
						
							2010-05-26 20:37:03 +00:00  
				
					
						
							
							
								 
						
							
								9d40ef162b 
								
							 
						 
						
							
							
								
								MC/Mach-O: Factor out EmitInstTo{Fragment,Data} for emitting MCInst's as MCInstFragments or appending onto an MCDataFragment.  
							
							... 
							
							
							
							llvm-svn: 104735 
							
						 
						
							2010-05-26 20:37:00 +00:00  
				
					
						
							
							
								 
						
							
								388ff9b1a2 
								
							 
						 
						
							
							
								
								MC: Eliminate an unnecessary copy.  
							
							... 
							
							
							
							llvm-svn: 104709 
							
						 
						
							2010-05-26 17:50:16 +00:00  
				
					
						
							
							
								 
						
							
								a19838e107 
								
							 
						 
						
							
							
								
								MC: Simplify MayNeedRelaxation to not provide the fixups, so we can query it  
							
							... 
							
							
							
							before encoding.
llvm-svn: 104707 
							
						 
						
							2010-05-26 17:45:29 +00:00  
				
					
						
							
							
								 
						
							
								b34440a6a8 
								
							 
						 
						
							
							
								
								MC: Eliminate MCAsmFixup, replace with MCFixup.  
							
							... 
							
							
							
							llvm-svn: 104699 
							
						 
						
							2010-05-26 15:18:56 +00:00  
				
					
						
							
							
								 
						
							
								353a91ff76 
								
							 
						 
						
							
							
								
								MC: Use accessors for access to MCAsmFixup.  
							
							... 
							
							
							
							llvm-svn: 104697 
							
						 
						
							2010-05-26 15:18:31 +00:00  
				
					
						
							
							
								 
						
							
								09d47031b1 
								
							 
						 
						
							
							
								
								Expand on comment.  
							
							... 
							
							
							
							llvm-svn: 104396 
							
						 
						
							2010-05-21 23:03:53 +00:00  
				
					
						
							
							
								 
						
							
								feedc90c57 
								
							 
						 
						
							
							
								
								Implement EmitTBSSSymbol for MachOStreamer.  
							
							... 
							
							
							
							Fixes build failure as well.
llvm-svn: 104059 
							
						 
						
							2010-05-18 21:26:41 +00:00  
				
					
						
							
							
								 
						
							
								d5563f420a 
								
							 
						 
						
							
							
								
								MC/Mach-O: Implement support for setting indirect symbol table offset in section header.  
							
							... 
							
							
							
							Also, create symbol data for LHS of assignment, to match 'as' symbol ordering better.
llvm-svn: 104033 
							
						 
						
							2010-05-18 17:28:24 +00:00  
				
					
						
							
							
								 
						
							
								39617bb08a 
								
							 
						 
						
							
							
								
								MC/Mach-O: Fail faster/harder when we see .file, which isn't yet supported.  
							
							... 
							
							
							
							llvm-svn: 104031 
							
						 
						
							2010-05-18 17:28:17 +00:00  
				
					
						
							
							
								 
						
							
								b7b796cc11 
								
							 
						 
						
							
							
								
								MC/Mach-O: Reverse order of SymbolData scanning when emitting instructions.  
							
							... 
							
							
							
							- This fixes a string table mismatch with 'as' when two new symbols are defined
   in a single instruction.
llvm-svn: 103979 
							
						 
						
							2010-05-17 21:19:59 +00:00  
				
					
						
							
							
								 
						
							
								0211a96989 
								
							 
						 
						
							
							
								
								MC/Mach-O: Fix some differences in symbol flag handling.  
							
							... 
							
							
							
							- Don't clear weak reference flag, 'as' was only "trying" to do this, it wasn't
   actually succeeding.
 - Clear the "lazy bound" bit when we mark something external. This corresponds
   roughly to the lazy clearing of the bit that 'as' implements in
   symbol_table_lookup.
 - The exact meaning of these flags appears pretty loose, since 'as' isn't very
   consistent. For now we just try to match 'as', we will clean this up one day
   hopefully.
llvm-svn: 103964 
							
						 
						
							2010-05-17 20:12:31 +00:00  
				
					
						
							
							
								 
						
							
								9fb6bb07ca 
								
							 
						 
						
							
							
								
								Add AsmParser support for darwin tbss directive.  
							
							... 
							
							
							
							Nothing uses this yet.
llvm-svn: 103757 
							
						 
						
							2010-05-14 01:50:28 +00:00  
				
					
						
							
							
								 
						
							
								b76df22a2e 
								
							 
						 
						
							
							
								
								MC: Move MCAlignFragment::EmitNops value out of the constructor.  
							
							... 
							
							
							
							llvm-svn: 103665 
							
						 
						
							2010-05-12 22:56:23 +00:00  
				
					
						
							
							
								 
						
							
								4405ffc688 
								
							 
						 
						
							
							
								
								MC: Eliminate MCZeroFillFragment, it is no longer needed.  
							
							... 
							
							
							
							llvm-svn: 103664 
							
						 
						
							2010-05-12 22:51:38 +00:00  
				
					
						
							
							
								 
						
							
								51402b79e4 
								
							 
						 
						
							
							
								
								MC: Drop support for alignment in ZeroFill fragment, we can just use  
							
							... 
							
							
							
							MCAlignFragments for this.
llvm-svn: 103661 
							
						 
						
							2010-05-12 22:51:27 +00:00  
				
					
						
							
							
								 
						
							
								aadb2cac49 
								
							 
						 
						
							
							
								
								MC/Mach-O: Explicitly track atoms, as represented by their defining symbol, for each fragment (not yet used).  
							
							... 
							
							
							
							llvm-svn: 103438 
							
						 
						
							2010-05-10 22:45:09 +00:00  
				
					
						
							
							
								 
						
							
								72afa956db 
								
							 
						 
						
							
							
								
								break coff symbol definition stuff out into proper MCStreamer callbacks,  
							
							... 
							
							
							
							patch by Nathan Jeffords!
llvm-svn: 103346 
							
						 
						
							2010-05-08 19:54:22 +00:00  
				
					
						
							
							
								 
						
							
								51bed9c870 
								
							 
						 
						
							
							
								
								Fix i386 relocations to Weak Definitions.  The relocation entries should be  
							
							... 
							
							
							
							external and the item to be relocated should not have the address of the
symbol added in.
llvm-svn: 103302 
							
						 
						
							2010-05-07 21:44:23 +00:00  
				
					
						
							
							
								 
						
							
								f3a53baf00 
								
							 
						 
						
							
							
								
								MC/Mach-O: Mark absolute variable's appropriately, and add Mach-O support for  
							
							... 
							
							
							
							writing them.
 - <rdar://problem/7885351> integrated assembler broken for i386 objc code
llvm-svn: 103112 
							
						 
						
							2010-05-05 19:01:05 +00:00  
				
					
						
							
							
								 
						
							
								deb7ba9cc0 
								
							 
						 
						
							
							
								
								MC: Reject attempts to define a variable symbol.  
							
							... 
							
							
							
							llvm-svn: 103111 
							
						 
						
							2010-05-05 19:01:00 +00:00  
				
					
						
							
							
								 
						
							
								7a989da0af 
								
							 
						 
						
							
							
								
								MC: Rename MCSymbol::{g,s}etValue -> MCSymbol::{g,s}etVariableValue.  
							
							... 
							
							
							
							llvm-svn: 103095 
							
						 
						
							2010-05-05 17:41:00 +00:00  
				
					
						
							
							
								 
						
							
								d821f4ac60 
								
							 
						 
						
							
							
								
								llvm-mc: Add a -mc-relax-all option, which relaxes every fixup. We always need  
							
							... 
							
							
							
							exactly two passes in that case, and don't ever need to recompute any layout,
so this is a nice baseline for relaxation performance.
llvm-svn: 99563 
							
						 
						
							2010-03-25 22:49:09 +00:00  
				
					
						
							
							
								 
						
							
								de04b3f62c 
								
							 
						 
						
							
							
								
								MC: Switch to using MCInst fragments to do relaxation.  
							
							... 
							
							
							
							Also, both MCMachOStreamer and MCAssembler are now target independent!
llvm-svn: 99256 
							
						 
						
							2010-03-23 05:09:03 +00:00  
				
					
						
							
							
								 
						
							
								86face8333 
								
							 
						 
						
							
							
								
								MC: Add TargetAsmBackend::MayNeedRelaxation, for checking whether a particular instruction + fixups might need relaxation.  
							
							... 
							
							
							
							llvm-svn: 99249 
							
						 
						
							2010-03-23 03:13:05 +00:00  
				
					
						
							
							
								 
						
							
								a9ae3ae698 
								
							 
						 
						
							
							
								
								MC: Add TargetAsmBackend::WriteNopData and use to eliminate some target dependencies in MCMachOStreamer and MCAssembler.  
							
							... 
							
							
							
							llvm-svn: 99248 
							
						 
						
							2010-03-23 02:36:58 +00:00  
				
					
						
							
							
								 
						
							
								b31c49a70d 
								
							 
						 
						
							
							
								
								MC: Add MCInstFragment, not used yet.  
							
							... 
							
							
							
							llvm-svn: 99229 
							
						 
						
							2010-03-22 23:16:48 +00:00  
				
					
						
							
							
								 
						
							
								f1f1827bfa 
								
							 
						 
						
							
							
								
								MC/Mach-O: Factor out getOrCreateDataFragment().  
							
							... 
							
							
							
							llvm-svn: 99204 
							
						 
						
							2010-03-22 20:35:46 +00:00  
				
					
						
							
							
								 
						
							
								1bd7171c95 
								
							 
						 
						
							
							
								
								MC: Sink code emitter into MCAssembler.  
							
							... 
							
							
							
							llvm-svn: 98953 
							
						 
						
							2010-03-19 10:43:18 +00:00  
				
					
						
							
							
								 
						
							
								aa8f95eb56 
								
							 
						 
						
							
							
								
								MC: Fix a crash on invalid, attempting to evaluate undefined symbols.  
							
							... 
							
							
							
							llvm-svn: 98464 
							
						 
						
							2010-03-14 03:10:40 +00:00  
				
					
						
							
							
								 
						
							
								921e79f5eb 
								
							 
						 
						
							
							
								
								MC: Add MCAssembler::addFixup, which enforces that fixups are added in order.  
							
							... 
							
							
							
							llvm-svn: 98379 
							
						 
						
							2010-03-12 21:00:38 +00:00  
				
					
						
							
							
								 
						
							
								c5ddbad237 
								
							 
						 
						
							
							
								
								MC: Provide MCAssembler with a TargetAsmBackend.  
							
							... 
							
							
							
							llvm-svn: 98222 
							
						 
						
							2010-03-11 01:34:27 +00:00  
				
					
						
							
							
								 
						
							
								6eab721011 
								
							 
						 
						
							
							
								
								MC: Move the backend section and symbol data maps to MCAssembler.  
							
							... 
							
							
							
							llvm-svn: 98186 
							
						 
						
							2010-03-10 20:58:29 +00:00  
				
					
						
							
							
								 
						
							
								7e3283c055 
								
							 
						 
						
							
							
								
								Remove unneeded includes.  
							
							... 
							
							
							
							llvm-svn: 98167 
							
						 
						
							2010-03-10 17:56:05 +00:00  
				
					
						
							
							
								 
						
							
								e83d74f626 
								
							 
						 
						
							
							
								
								This is the first patch to put the needed bits in place to eventually allow code  
							
							... 
							
							
							
							to be aligned with optimal nops.  This patch does not change any functionality
and when the compiler is changed to use EmitCodeAlignment() it should also not
change the resulting output.  Once the compiler change is made and everything
looks good the next patch with the table of optimal X86 nops will be added to
WriteNopData() changing the output.  There are many FIXMEs in this patch which
will be removed when we have better target hooks (coming soon I hear).
llvm-svn: 96963 
							
						 
						
							2010-02-23 18:26:34 +00:00  
				
					
						
							
							
								 
						
							
								5fe3129a5d 
								
							 
						 
						
							
							
								
								MC/Mach-O: Remove non-sensical comment, and add a missing AddValueSymbols call.  
							
							... 
							
							
							
							llvm-svn: 96809 
							
						 
						
							2010-02-22 22:08:57 +00:00  
				
					
						
							
							
								 
						
							
								1e2fad3de8 
								
							 
						 
						
							
							
								
								MC/Mach-O: Start emitting fixups/relocations for instructions.  
							
							... 
							
							
							
							llvm-svn: 96095 
							
						 
						
							2010-02-13 09:29:02 +00:00  
				
					
						
							
							
								 
						
							
								3374835b46 
								
							 
						 
						
							
							
								
								MCAssembler: Switch MCAsmFixup to storing MCFixupKind instead of just a size.  
							
							... 
							
							
							
							llvm-svn: 96094 
							
						 
						
							2010-02-13 09:28:54 +00:00  
				
					
						
							
							
								 
						
							
								1a1fbb50fc 
								
							 
						 
						
							
							
								
								MC/Mach-O: Implement EmitValue using data fragments + fixups instead of fill fragment.  
							
							... 
							
							
							
							llvm-svn: 96091 
							
						 
						
							2010-02-13 09:28:22 +00:00  
				
					
						
							
							
								 
						
							
								b311a6b3ae 
								
							 
						 
						
							
							
								
								MC: First cut at MCFixup, for getting fixup/relocation information out of an MCCodeEmitter.  
							
							... 
							
							
							
							llvm-svn: 95708 
							
						 
						
							2010-02-09 22:59:55 +00:00  
				
					
						
							
							
								 
						
							
								38d022efe9 
								
							 
						 
						
							
							
								
								add scaffolding for target-specific MCExprs.  
							
							... 
							
							
							
							llvm-svn: 95559 
							
						 
						
							2010-02-08 19:41:07 +00:00  
				
					
						
							
							
								 
						
							
								255a8c8b13 
								
							 
						 
						
							
							
								
								MC/Mach-O: Set SOME_INSTRUCTIONS bit for sections.  
							
							... 
							
							
							
							llvm-svn: 95135 
							
						 
						
							2010-02-02 21:44:01 +00:00  
				
					
						
							
							
								 
						
							
								3cde760023 
								
							 
						 
						
							
							
								
								mcstreamerize gprel32 emission.  
							
							... 
							
							
							
							llvm-svn: 94452 
							
						 
						
							2010-01-25 21:28:50 +00:00