%************************************************************************
%* *
-\section[Driver-asm-fiddling]{Fiddling with assembler files (iX86)}
+\section[Driver-asm-fiddling]{Fiddling with assembler files}
%* *
%************************************************************************
Any other required tidying up.
\end{itemize}
+%************************************************************************
+%* *
+\subsection{Constants for various architectures}
+%* *
+%************************************************************************
+
\begin{code}
sub init_TARGET_STUFF {
$T_HDR_fast = "\.text\n\t\.align 16\n";
$T_HDR_vector = "\.text\n\t\.align 16\n"; # NB: requires padding
$T_HDR_direct = "\.text\n\t\.align 16\n";
+
+ } elsif ( $TargetPlatform =~ /^powerpc-.*/ ) {
+
+ $T_STABBY = 0; # 1 iff .stab things (usually if a.out format)
+ $T_US = '\.'; # _ if symbols have an underscore on the front
+ $T_DO_GC = 'PerformGC_wrapper';
+ $T_PRE_APP = 'NOT APPLICABLE'; # regexp that says what comes before APP/NO_APP
+ $T_CONST_LBL = '^LC\.\.(\d+):$'; # regexp for what such a lbl looks like
+ $T_POST_LBL = ':';
+ $T_PRE_LLBL_PAT = '\.L';
+ $T_PRE_LLBL = '.L';
+ $T_X86_BADJMP = 'NOT APPLICABLE';
+
+ $T_MOVE_DIRVS = '^\s*(\.align\s+\d+(,0x90)?\n|\.globl\s+\S+\n|\.text\n|\.data\n|\.section\s+.*\n|\.type\s+.*\n|\.Lfe.*\n\t\.size\s+.*\n|\.size\s+.*\n|\.ident.*\n)';
+ $T_COPY_DIRVS = '\.(globl)';
+
+ $T_hsc_cc_PAT = '\.string.*\)(hsc|cc) (.*)\\\\t(.*)"';
+ $T_DOT_WORD = '\.long';
+ $T_HDR_string = "\.section\t\.rodata\n"; # or just use .text??? (WDP 95/11)
+ $T_HDR_misc = "\.text\n\t\.align 16\n";
+ $T_HDR_data = "\.data\n\t\.align 4\n"; # ToDo: change align??
+ $T_HDR_consist = "\.text\n";
+ $T_HDR_closure = "\.data\n\t\.align 4\n"; # ToDo: change align?
+ $T_HDR_info = "\.text\n\t\.align 16\n"; # NB: requires padding
+ $T_HDR_entry = "\.text\n"; # no .align so we're right next to _info (arguably wrong...?)
+ $T_HDR_fast = "\.text\n\t\.align 16\n";
+ $T_HDR_vector = "\.text\n\t\.align 16\n"; # NB: requires padding
+ $T_HDR_direct = "\.text\n\t\.align 16\n";
}
if ( 0 ) {
}
\end{code}
+%************************************************************************
+%* *
+\subsection{Mangle away}
+%* *
+%************************************************************************
+
\begin{code}
sub mangle_asm {
local($in_asmf, $out_asmf) = @_;