From 4cdc197978cf22419b2f4344a19c87c474c8fc1c Mon Sep 17 00:00:00 2001 From: igloo Date: Sat, 16 Aug 2003 11:19:08 +0000 Subject: [PATCH] [project @ 2003-08-16 11:19:07 by igloo] Sparc Linux configure and mangler --- configure.in | 9 +++++++++ ghc/driver/mangler/ghc-asm.lprl | 27 +++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/configure.in b/configure.in index 50f9fc8..0c5a11a 100644 --- a/configure.in +++ b/configure.in @@ -312,6 +312,15 @@ sparc-sun-solaris2*) HostVendor_CPP='sun' HostOS_CPP='solaris2' ;; +sparc*-linux*) + HostPlatform=sparc-unknown-linux + TargetPlatform=sparc-unknown-linux + BuildPlatform=sparc-unknown-linux + HostPlatform_CPP='sparc_unknown_linux' + HostArch_CPP='sparc' + HostVendor_CPP='unknown' + HostOS_CPP='linux' + ;; *) echo "Unrecognised platform: $HostPlatform" exit 1 diff --git a/ghc/driver/mangler/ghc-asm.lprl b/ghc/driver/mangler/ghc-asm.lprl index 7ddacaf..c929624 100644 --- a/ghc/driver/mangler/ghc-asm.lprl +++ b/ghc/driver/mangler/ghc-asm.lprl @@ -371,6 +371,33 @@ sub init_TARGET_STUFF { $T_create_word = "\t.word"; #--------------------------------------------------------# + } elsif ( $TargetPlatform =~ /^sparc-.*-linux/ ) { + $T_STABBY = 0; # 1 iff .stab things (usually if a.out format) + $T_US = ''; # _ if symbols have an underscore on the front + $T_PRE_APP = '#'; # regexp that says what comes before APP/NO_APP + # Probably doesn't apply anyway + $T_CONST_LBL = '^\.LLC(\d+):$'; # regexp for what such a lbl looks like + $T_POST_LBL = ':'; + + $T_MOVE_DIRVS = '^((\s+\.align\s+\d+|\s+\.proc\s+\d+|\s+\.global\s+\S+|\.text|\.data|\.seg|\.stab.*|\.section.*|\s+\.type.*|\s+\.size.*)\n)'; + $T_COPY_DIRVS = '\.(global|globl|proc|stab)'; + + $T_hsc_cc_PAT = '\.asciz.*\)(hsc|cc) (.*)\\\\t(.*)"'; + $T_DOT_WORD = '\.(long|word|nword|xword|byte|half|short|skip|uahalf|uaword)'; + $T_DOT_GLOBAL = '^\t\.global'; + $T_HDR_literal = "\.text\n\t\.align 8\n"; + $T_HDR_misc = "\.text\n\t\.align 4\n"; + $T_HDR_data = "\.data\n\t\.align 8\n"; + $T_HDR_consist = "\.text\n"; + $T_HDR_closure = "\.data\n\t\.align 4\n"; + $T_HDR_srt = "\.data\n\t\.align 4\n"; + $T_HDR_info = "\.text\n\t\.align 4\n"; + $T_HDR_entry = "\.text\n\t\.align 4\n"; + $T_HDR_vector = "\.text\n\t\.align 4\n"; + $T_HDR_direct = "\.text\n\t\.align 4\n"; + $T_create_word = "\t.word"; + + #--------------------------------------------------------# } else { print STDERR "$Pgm: don't know how to mangle assembly language for: $TargetPlatform\n"; exit 1; -- 1.7.10.4