llvm-6502/lib
Jack Carter bb78930489 Mips specific inline asm operand modifier 'L'.
Low order register of a double word register operand. Operands 
   are defined by the name of the variable they are marked with in
   the inline assembler code. This is a way to specify that the 
   operand just refers to the low order register for that variable.
   
   It is the opposite of modifier 'D' which specifies the high order
   register.
   
   Example:
   
 main()
{

    long long ll_input = 0x1111222233334444LL;
    long long ll_val = 3;
    int i_result = 0;

    __asm__ __volatile__( 
		   "or	%0, %L1, %2"
	     : "=r" (i_result) 
	     : "r" (ll_input), "r" (ll_val)); 
}

   Which results in:
   
   	lui	$2, %hi(_gp_disp)
	addiu	$2, $2, %lo(_gp_disp)
	addiu	$sp, $sp, -8
	addu	$2, $2, $25
	sw	$2, 0($sp)
	lui	$2, 13107
	ori	$3, $2, 17476     <-- Low 32 bits of ll_input
	lui	$2, 4369
	ori	$4, $2, 8738      <-- High 32 bits of ll_input
	addiu	$5, $zero, 3  <-- Low 32 bits of ll_val
	addiu	$2, $zero, 0  <-- High 32 bits of ll_val
	#APP
	or	$3, $4, $5        <-- or i_result, high 32 ll_input, low 32 of ll_val
	#NO_APP
	addiu	$sp, $sp, 8
	jr	$ra

If not direction is done for the long long for 32 bit variables results
in using the low 32 bits as ll_val shows.

There is an existing bug if 'L' or 'D' is used for the destination register
for 32 bit long longs in that the target value will be updated incorrectly
for the non-specified part unless explicitly set within the inline asm code.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160028 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-10 22:41:20 +00:00
..
Analysis Delete code for folding undefs in ScalarEvolution. It's invalid in 2012-07-09 23:51:20 +00:00
Archive Include cstdio in a few place that depended on getting it transitively through StringExtras.h 2012-03-23 11:35:30 +00:00
AsmParser Extend the IL for selecting TLS models (PR9788) 2012-06-23 11:37:03 +00:00
Bitcode llvm/lib: [CMake] Add explicit dependency to intrinsics_gen. 2012-06-24 13:32:01 +00:00
CodeGen Require and preserve LoopInfo for early if-conversion. 2012-07-10 22:39:56 +00:00
DebugInfo Fix a bug in DebugInfo lib, extend a comment for one of the methods 2012-07-04 09:42:54 +00:00
ExecutionEngine Move lib/Analysis/DebugInfo.cpp to lib/VMCore/DebugInfo.cpp and 2012-06-28 00:05:13 +00:00
Linker Extend the IL for selecting TLS models (PR9788) 2012-06-23 11:37:03 +00:00
MC I'm introducing a new machine model to simultaneously allow simple 2012-07-07 04:00:00 +00:00
Object Added accessors for getting coff_relocation info 2012-06-18 19:47:16 +00:00
Support Enable automatic GCC<->LLVM intrinsic translation for mips. 2012-06-28 19:09:53 +00:00
TableGen Emit TableGen's header comment with C-style comments, so it can be used from C89 code. 2012-06-19 17:04:16 +00:00
Target Mips specific inline asm operand modifier 'L'. 2012-07-10 22:41:20 +00:00
Transforms instcombine: merge the functions that remove dead allocas and dead mallocs/callocs/... 2012-07-09 18:38:20 +00:00
VMCore Use the DebugInfo wrappers instead of mucking about with the MDNode directly. 2012-07-07 00:52:35 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile