mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-03 14:21:30 +00:00 
			
		
		
		
	git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3357 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			32 lines
		
	
	
		
			667 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			667 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/sh
 | 
						|
# test that every step outputs something that is consumable by 
 | 
						|
# another step
 | 
						|
 | 
						|
rm -f test.bc.temp[12]
 | 
						|
 | 
						|
LD_LIBRARY_PATH=$3
 | 
						|
export LD_LIBRARY_PATH
 | 
						|
 | 
						|
AS=$2/as
 | 
						|
DIS=$2/dis
 | 
						|
 | 
						|
echo "======== Running assembler/disassembler test on $1"
 | 
						|
 | 
						|
# Two full cycles are needed for bitwise stability
 | 
						|
(
 | 
						|
  $AS  < $1      > $1.bc.1 || exit 1
 | 
						|
  $DIS < $1.bc.1 > $1.ll.1 || exit 2
 | 
						|
  $AS  < $1.ll.1 > $1.bc.2 || exit 3
 | 
						|
  $DIS < $1.bc.2 > $1.ll.2 || exit 4
 | 
						|
 | 
						|
  diff $1.ll.[12] || exit 7
 | 
						|
 | 
						|
  # FIXME: When we sort things correctly and deterministically, we can
 | 
						|
  # reenable this
 | 
						|
  #diff $1.bc.[12] || exit 8
 | 
						|
 | 
						|
  rm $1.[bl][cl].[12]
 | 
						|
  touch Output/$1.asmdis
 | 
						|
) || ../Failure.sh "$1 ASM/DIS"
 | 
						|
 |