version 1.1, 2001/04/23 05:45:35 |
version 1.2, 2003/04/19 10:36:29 |
|
|
@comment $OpenXM$ |
@comment $OpenXM: OpenXM/src/asir-doc/int-parts/port.texi,v 1.1 2001/04/23 05:45:35 noro Exp $ |
@chapter $B0\?"(B |
@chapter $B0\?"(B |
|
|
@code{risa} $B$OBgItJ,(B C $B$K$h$j=q$+$l$F$$$k$,(B, $BB?G\D91i;;It$N0lIt$O%"%;(B |
@code{risa} $B$OBgItJ,(B C $B$K$h$j=q$+$l$F$$$k$,(B, $BB?G\D91i;;It$N0lIt$O%"%;(B |
|
|
|
|
@noindent |
@noindent |
$B$H$9$k(B. |
$B$H$9$k(B. |
|
|
@section $B%$%s%/%j%a%s%?%k%m!<%G%#%s%0(B(ASIR) |
|
|
|
@code{ASIR} $B$G$O(B, $B%j%m%1!<%?%V%k(B object (@code{xxx.o}) $B$r<B9TCf$K(B |
|
$B%m!<%I$G$-$k(B. $B$3$N5!G=$O(B, @code{UNIX} $BHG$G$O(B @code{KCL} (Kyoto Common |
|
Lisp) $B$GMQ$$$i$l$F$$$kJ}K!$r;29M$K$7$F<B8=$5$l$F$$$k(B. |
|
(@samp{parse/load.c} $B$N(B @code{loadaoutfile()}. ) $B$3$l$O(B, @code{ld} |
|
(link editor) $B$N%$%s%/%j%a%s%?%k%m!<%G%#%s%05!G=$rMQ$$$F$$$k(B. |
|
@code{ld} $B$,$3$N5!G=$r;}$?$J$$>l9g$O2?$i$+$N<jCJ$,I,MW$H$J$k(B. |
|
@code{KCL} $B$G$O(B, $B%j%s%/%(%G%#%?$rJL$KMQ0U$9$k$3$H$GBP1~$7$F$$$k(B. |
|
@code{ld} $B$,$3$N5!G=$r;}$D>l9g$K$b(B, object $B%U%!%$%k$N%X%C%@$N7A(B |
|
$B<0$N0c$$$K$h$jJQ99$,I,MW$K$J$k>l9g$b$"$k(B. $B4pK\E*$K$O<!$N0lO"$NA`:n$r9T(B |
|
$B$J$&H!?t$r=q$1$P$h$$(B. |
|
|
|
@enumerate |
|
@item |
|
$B%m!<%I$9$Y$-%U%!%$%k$r(B @code{ld} $B$K$h$j%$%s%/%j%a%s%?%k%m!<%I$9$k(B. $B$3(B |
|
$B$l$O(B, $B%j%s%/8e$N(B object $B$N%5%$%:$rD4$Y$k$?$a$N%m!<%I$G$"$k(B. |
|
@item |
|
1. $B$G$G$-$?(B object $BMQ$NNN0h$r3NJ]$9$k(B. $B$3$NNN0h$N@hF,%]%$%s%?$O(B, |
|
GC $B$G2s<}$5$l$k$N$rKI$0$?$a(B, $B%R!<%WNN0h$+$i;O$^$k%j%9%H$K7R$0(B. |
|
@item |
|
2. $B$GF@$?%]%$%s%?$r%W%m%0%i%`NN0h$N@hF,%"%I%l%9$H$7$F(B, $B2~$a$F%m!<%I$9(B |
|
$B$k(B. |
|
@item |
|
3. $B$G$G$-$?(B object $B$r(B 2. $B$G3NJ]$7$?NN0h>e$KFI$_9~$`(B. |
|
@item |
|
$B%m!<%I2DG=$J(B object $B$N@hF,$O(B, $B$=$N%U%!%$%k$K4^$^$l$kH!?t$r(B |
|
@code{ASIR} $B$KEPO?$9$k$?$a$NH!?t$H$J$C$F$$$k$N$G(B, $B$=$l$r8F$S=P$9(B. |
|
@end enumerate |
|
|
|
@code{mips} $B$r(B CPU $B$H$9$k%^%7%s$G$O(B, $B%m!<%I$5$l$k(B object $B$r%3%s%Q(B |
|
$B%$%k$9$k:]$K$d$dFC<l$JCm0U$rMW$9$k>l9g$,$"$k(B. $B$3$3$G$O(B |
|
@code{DECStation} $B$rNc$K$H$j@bL@$9$k(B. @code{mips} $B$G$O(B, $BH!?t8F$S=P$7$O(B |
|
|
|
@example |
|
jal function |
|
@end example |
|
|
|
@noindent |
|
$B$H%3%s%Q%$%k$5$l$k(B. $B$7$+$7(B, @code{jal} $B$O(B, $B8=:_$N%W%m%0%i%`%+%&%s%?$N(B |
|
$B>e(B 4bit $B$rHt$S@h%"%I%l%9$N>e(B 4bit $B$H$7$F;H$&$?$a(B, @code{function} $B$N(B |
|
$B%"%I%l%9$N>e(B 4bit $B$,8=:_$N%W%m%0%i%`%+%&%s%?$N>e(B 4bit $B$H0lCW$7$J$$$H8F(B |
|
$B$S=P$7$G$-$J$$(B. $B>e5-$N$h$&$JJ}K!$G%$%s%/%j%a%s%?%k%m!<%I$7$?>l9g(B, $B%*%V(B |
|
$B%8%'%/%H$O%R!<%W$KCV$+$l$k$3$H$K$J$k$,(B, @code{DECStation} $B$N>l9g(B, $B85$N(B |
|
$B%W%m%0%i%`NN0h$H(B, $B%R!<%W$G$O(B, $B>e(B 4bit $B$,0[$J$k(B. $B$h$C$F(B, $BIaDL$K%3%s%Q%$(B |
|
$B%k$7$?(B object $B$O%m!<%I$G$-$J$$(B. $B%3%s%Q%$%i$*$h$S%"%;%s%V%i$G$3$l$r(B |
|
$B2r>C$9$kJ}K!$,:#$N=j8+Ev$?$i$J$$$N$G(B, $B<!$N$h$&$JJ}K!$r$H$k$3$H$K$7$?(B. |
|
$B$9$J$o$A(B, @code{cc -S} $B$G%"%;%s%V%i$N%=!<%9$r=P$7(B, |
|
|
|
@example |
|
jal function |
|
@end example |
|
@noindent |
|
$B$r(B |
|
@example |
|
.set noat |
|
la $at,function |
|
jal $at |
|
.set at |
|
@end example |
|
|
|
@noindent |
|
$B$K=q$-49$($F(B, $B%"%;%s%V%k$9$k$3$H$H$7$?(B. ($B<B:]$K$O(B, @code{cc}, |
|
@code{as} $B6&$K(B @samp{-G 0} $B$J$k%*%W%7%g%s$,I,MW$G$"$k(B. $B$^$?(B, @code{as} |
|
$B$N(B $B7Y9p%a%C%;!<%8$r>C$9$?$a$K$O(B, @samp{-w} $B$J$k%*%W%7%g%s$rIU$1$k(B. ) |
|
$B$3$N=q$-49$($O(B, $B<!$N(B @code{awk} $B%9%/%j%W%H$K$h$j9T$J$o$l$k(B. |
|
|
|
@example |
|
{ |
|
if ( $1 == "jal" && substr($2,0,1) != "$" ) |
|
printf "\t.set\tnoat\n\tla\t$at,%s\n\tjal\t$at\n\t.set\tat\n",$2 |
|
else print |
|
} |
|
@end example |
|
|
|
@noindent |
|
|
|
$B$3$N=$@5$O(B, @code{mips} $B$r(B CPU $B$H$9$kB>$N%^%7%s(B (@code{RISC NEWS} $B$J$I(B) |
|
$B$KBP$7$F$bI,MW$G$"$k$H;W$o$l$k(B. |
|
|
|
@section NeXT $B$X$N0\?"(B |
|
|
|
$B$3$l$^$G(B @code{UNIX} $B>e$G$N0\?":n6H$K$D$$$F=R$Y$F$-$?$,(B, @code{NeXT} |
|
$B$O(B @code{Mach} $B$r(B OS $B$H$9$k%^%7%s$G$"$j(B, GC, $B%$%s%/%j%a%s%?%k%m!<%G%#(B |
|
$B%s%0$J$I$h$j(B OS $B$K0MB8$9$kItJ,$G$ODL>o$N(B @code{UNIX} $B$H0[$J$kItJ,$,=P(B |
|
$B$F$/$k(B. $B$=$l$i$K$D$$$F=R$Y$k(B. |
|
|
|
@subsection $B%a%b%j4IM}(B |
|
|
|
@code{UNIX} $B$H(B @code{Mach} $B$G$O(B, OS $BB&$N(B $B%a%b%j4IM}$,Bg$-$/0[$J$C$F$$(B |
|
$B$k(B. @code{UNIX} $B$K$*$$$F$O(B, $B%G!<%?%;%0%a%s%H$OO"B3NN0h$G$"$j(B, OS $B$KBP(B |
|
$B$9$k(B $B%a%b%j$NMW5a$O(B, $B$=$NNN0h$r?-$P$9$3$H$K$h$jK~$?$5$l$k(B. $B$7$+$7(B, |
|
@code{Mach} $B$K$*$$$F$O(B, @code{vm_allocate()} $B$J$kH!?t$K$h$j8DJL$NNN0h(B |
|
$B$H$7$FM?$($i$l(B, $B0lHL$K$=$l$iA4BN$OO"B3$7$?NN0h$H$O$J$i$J$$(B. $B%*%j%8%J%k(B |
|
$B$N(B GC $B$G$O(B, $B%G!<%?%;%0%a%s%H$N(B $B@hF,(B, $BKvHx$@$1$rCN$C$F(B, $B$=$N4V$rA4$F(B |
|
$B8!::$9$k$,(B, @code{Mach} $B$N>l9g(B, $B$3$N$^$^$G$O%"%/%;%90cH?$r5/$3$92DG=@-(B |
|
$B$,$"$k(B. $B$3$l$i$r9MN8$7$F(B, @code{NeXT} $BHG$G$O<!$N$h$&$JJQ99$r9T$J$C$?(B. |
|
|
|
@enumerate |
|
@item |
|
$B%*%j%8%J%k$G(B @code{brk()}, @code{sbrk()} $B$G=q$+$l$F$$$kItJ,$r(B |
|
@code{vm_allocate()} $B$r;H$C$F=q$-D>$7$?(B. |
|
@item |
|
$B8zN(Dc2<$r>7$/62$l$O$"$k$,(B, @code{vm_allocate()} $B$GF@$?NN0h$N>e2<8B$N(B |
|
$B%j%9%H$rJ];}$7(B, $B$"$k?t$,BEEv$J%]%$%s%?$G$"$k$+H]$+$N%A%'%C%/$N:]$K(B, $B$3(B |
|
$B$N%j%9%H$K$h$k%A%'%C%/$b9T$J$&$h$&$K$7$?(B. |
|
@end enumerate |
|
|
|
@noindent |
|
$B$3$l$i$NJQ99$O(B, $B$=$NB>$N(B @code{Mach} $B%^%7%s$K$bDLMQ$9$k$H;W$o$l$k(B. |
|