OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.18.50/] [gas/] [testsuite/] [gas/] [xstormy16/] [gcc.sh] - Blame information for rev 156

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
#/bin/sh
2
# Generate test result data for xstormy16 GAS testing.
3
# It is intended to be run in the testsuite source directory.
4
#
5
# Syntax: build.sh /path/to/build/gas
6
 
7
if [ $# = 0 ] ; then
8
  if [ ! -x ../gas/as-new ] ; then
9
    echo "Usage: $0 [/path/to/gas/build]"
10
  else
11
    BUILD=`pwd`/../gas
12
  fi
13
else
14
  BUILD=$1
15
fi
16
 
17
if [ ! -x $BUILD/as-new ] ; then
18
  echo "$BUILD is not a gas build directory"
19
  exit 1
20
fi
21
 
22
# Put results here, so we preserve the existing set for comparison.
23
rm -rf tmpdir
24
mkdir tmpdir
25
cd tmpdir
26
 
27
function gentest {
28
    rm -f a.out
29
    $BUILD/as-new ${1}.s -o a.out
30
    echo "#as:" >${1}.d
31
    echo "#objdump: -dr" >>${1}.d
32
    echo "#name: $1" >>${1}.d
33
    $BUILD/../binutils/objdump -dr a.out |      sed -e 's/(/\\(/g'             -e 's/)/\\)/g'             -e 's/\$/\\$/g'             -e 's/\[/\\\[/g'             -e 's/\]/\\\]/g'             -e 's/[+]/\\+/g'             -e 's/[.]/\\./g'             -e 's/[*]/\\*/g' |    sed -e 's/^.*file format.*$/.*: +file format .*/'       >>${1}.d
34
    rm -f a.out
35
}
36
 
37
# Now come all the testcases.
38
cat > gcc.s <<EOF
39
        mov.w r0,#-1
40
        mov.w r0,#0xFFFF
41
        add r0,#some_external_symbol
42
EOF
43
 
44
# Finally, generate the .d file.
45
gentest gcc

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.