Annotation of OpenXM/src/asir-doc/int-parts/port.texi, Revision 1.2
1.2 ! noro 1: @comment $OpenXM: OpenXM/src/asir-doc/int-parts/port.texi,v 1.1 2001/04/23 05:45:35 noro Exp $
1.1 noro 2: @chapter $B0\?"(B
3:
4: @code{risa} $B$OBgItJ,(B C $B$K$h$j=q$+$l$F$$$k$,(B, $BB?G\D91i;;It$N0lIt$O%"%;(B
5: $B%s%V%i$K$h$j5-=R$5$l$F$$$k(B. $B$^$?(B, $B%a%b%j4IM}It$O(B, $B%;%0%a%s%H$NG[CV$K$h$j(B
6: $B%Q%i%a%?$ND4@0$,I,MW$G(B, $B7k2L$H$7$F(B OS $B$K0MB8$9$k(B. $B$=$NB>(B, $B:Y$+$$E@$G$$(B
7: $B$/$D$+5!<o0MB8$9$kItJ,$,$"$k(B. $B$3$3$G$O(B, $B0\?"$N:]$KI,MW$J:n6H$K$D$$$F=R(B
8: $B$Y$k(B.
9:
10: @section $BB?G\D91i;;It(B
11:
12: $BB?G\D91i;;It$G(B, $B%"%;%s%V%i$rMQ$$$F$$$kItJ,$O(B @samp{asm} $B$H$$$&%G%#%l%/(B
13: $B%H%j$K$^$H$a$i$l$F$$$k(B. $B%"%;%s%V%i$,I,MW$K$J$kM}M3$O(B, $BB?G\D9?t$NI=8=$G(B,
14: 1$B7e$rH>8lD9$h$jBg$-$/$H$k$H(B, $B>h=|;;$G(B, $BG\D91i;;$,I,MW$K$J$k$,(B, $BDL>o(B
15: $B$N(B C $B8@8l$G$OG\D91i;;$r%5%]!<%H$7$F$$$J$$$?$a$G$"$k(B. $BMQ0U$9$Y$-H!?t$O(B
16: $B<!$N(B 5$B$D$G$"$k(B.
17:
18: @example
19: int dm(a1,a2,pu) t = a1*a2; *pu = t/BASE; return t%BASE;
20: int a1,a2,*pu;
21:
22: int dmb(base,a1,a2,pu) t = a1*a2; *pu = t/base; return t%base;
23: int base,a1,a2,*pu;
24:
25: int dma(a1,a2,a3,pu) t = a1*a2+a3; *pu =t/BASE; return t%BASE;
26: int a1,a2,a3,*pu;
27:
28: int dmab(base,a1,a2,a3,pu) t = a1*a2+a3; *pu = t/base; return t%base;
29: int base,a1,a2,a3,*pu;
30:
31: int dmar(a1,a2,a3,d) t = a1*a2+a3; return t%d;
32: int a1,a2,a3,d;
33: @end example
34:
35: $B$3$l$i$r=q$/$3$H$K$h$j(B, $BB?G\D91i;;It$O40@.$9$k(B. $B8=:_$NHG$G$O(B,
36:
37: @table @code
38: @item 680X0 $BMQ(B
39: @code{asm3.s (SUN3$B$*$h$S(BNeXT), asma.s(apollo), asmn.s(NEWS)}
40: @item sparc $BMQ(B
41: @code{asm4.s}
42: @item VAX $BMQ(B
43: @code{asmv.s}
44: @item MIPS $BMQ(B
45: @code{asmm.s}
46: @end table
47:
48: $B$,MQ0U$5$l$F$$$k(B. $B%?!<%2%C%H$N(B CPU $B$,$3$l$i$KBP1~$9$k>l9g$K$O(B, $B$3$l$i(B
49: $B$r$=$N$^$^(B, $B$"$k$$$OB?>/JQ99$7$F;HMQ$9$k$3$H$,$G$-$k(B.
50:
51: $B$5$i$K(B, @samp{asm/@{ddM.c,ddN.c@}} $B$G$O(B, $B>e5-H!?t$N%$%s%i%$%sE83+$b;H(B
52: $BMQ$G$-$k(B. $B8=:_$N=j(B, CPU $B$,(B @code{680X0}, @code{VAX} $B$G$"$k%^%7%s$N$$$/(B
53: $B$D$+$G<B8=$5$l$F$$$k(B. $B$3$l$O(B, @code{gcc} $B$N(B $B%$%s%i%$%s(B @code{asm} $B$N5!(B
54: $BG=$rMQ$$$F$$$k$?$a(B, @code{gcc} $B$,;HMQ2DG=$G$"$k$3$H$,I,MW$G$"$k(B. $B$^$?(B,
55: @code{mips}, @code{sparc} $B$J$I(B, $B=j0b(B RISC CPU $B$G$O(B $B%$%s%i%$%sE83+$N8z(B
56: $B2L$,Gv$$$H9M$($i$l$k$?$a9T$J$C$F$$$J$$(B. @code{680X0} $B$r(B CPU $B$K;}$D%^%7(B
57: $B%s$KBP$7(B $B%$%s%i%$%sE83+$r9T$J$&$h$&$K$9$k>l9g(B, @samp{include/inline.h}
58: $B$rJQ99$9$kI,MW$,$"$k(B. @samp{inline.h} $B$G$O(B, @code{680X0} $BMQ$H$7$F(B,
59: @code{sun} $B$*$h$S(B @code{motorola} $B$N(B $B%"%;%s%V%iMQ$NFs$D$N%^%/%m$rMQ0U(B
60: $B$7$F$$$k(B. $B%?!<%2%C%H$N%^%7%s$N%"%;%s%V%i$,$I$A$i$N%"%;%s%V%i$rMQ(B
61: $B$$$F$$$k$+$K$h$j(B, $B$$$:$l$+$N%^%/%m$rA*Br$9$k$h$&$K(B @code{#if} $B$NItJ,(B
62: $B$KJQ99(B/$BDI2C$r9T$J$&(B.
63:
64: @section $B%a%b%j4IM}(B
65:
66: GC $B$K$*$$$F$O(B, $B%l%8%9%?(B, $B%9%?%C%/(B, $B@EE*NN0h$+$i$N%^!<%-%s%0$r9T$J$&(B.
67: $BFC$K(B, $B%l%8%9%?$O(B, $B5!<o0MB8$J$N$G(B, $B$3$NItJ,$O5!<oKh$K=q$/I,MW$,$"$k(B.
68: $B$3$l$O(B, @samp{gc/mach_dep.c} $B$K=8$a$i$l$F$$$k(B. $B$?$@$7(B, @code{mips} $B$K(B
69: $B$D$$$F$O(B @code{mips} $B$N(B C $B%3%s%Q%$%i$,(B, @code{asm} $BJ8$r5v$7$F$$$J$$$?(B
70: $B$a(B, @samp{gc/mips_mach_dep.s} $B$H$7$FJ,N%$5$l$F$$$k(B. $B$3$3$KG<$a$i$l$F$$(B
71: $B$J$$5!<o$KBP$7$F$O(B, $BB>5!<oMQ$NItJ,$r;2>H$7$F=q$/$3$H$K$J$k(B.
72: @samp{gc/runtime.h} $B$N@hF,ItJ,$K(B, $B5!<oJL$NDj5A$r9T$J$&ItJ,$,$"(B
73: $B$k(B. $B$3$3$GDj5A$5$l$?%7%s%\%k$K$h$j(B @samp{mach_dep.c} $B$N5!<oJL$N(B
74: $BH!?t$,A*$P$l$k$N$G(B, $BBP1~$,$-$A$s$H<h$l$k$h$&$K$9$k(B.
75: @samp{gc/runtime.h} $B$K$O(B, $BB?$/$N%Q%i%a%?$,Dj5A$5$l$F$$$k(B. $B$3$l$i$NFbBg(B
76: $BItJ,$O(B CPU, OS $B$KL54X78$@$,(B, @code{STACKTOP} $B$H(B @code{DATASTART} $B$N(B 2
77: $B$D$N%Q%i%a%?$@$1$O5!<oKh$KD4@0$9$kI,MW$,$"$k(B. $B$3$l$i$O<!$N$h$&$J0UL#$r(B
78: $B;}$D(B.
79:
80: @itemize @bullet
81: @item
82: STACKTOP
83: stack $B$N>e8B(B. $B$3$l$ODL>o(B @code{USRSTACK} $B$J$I$NL>A0$G(B
84: @samp{/usr/include/machine/vmparam.h} $B$KDj5A$5$l$F$$$k(B.
85:
86: @item
87: DATASTART
88: $B@EE*%G!<%?NN0h$N2<8B(B. $B>/$J$/$H$b(B @code{etext} ($B%W%m%0%i%`NN0h$N>e8B(B) $B$h$j>e$G$"(B
89: $B$k$,(B, $B$3$l$O5!<o$K$h$C$FMM!9$K0[$J$k(B. @code{etext} $B$H@EE*%G!<%?NN0h$N2<8B$,O"(B
90: $BB3$7$F$$$J$$>l9g(B, @code{DATASTART} $B$r<B:]$N2<8B$h$j2<$K$H$k$H(B $B%"%/%;%90cH?(B
91: $B$H$J$k>l9g$b$"$k$N$G(B, $B2?$i$+$NJ}K!$G@5$7$$CM$rD4$Y$F@_Dj$9$kI,MW$,$"$k(B.
92: @end itemize
93:
94: $B0J>e$K$h$j(B GC $B$OF0:n$9$k$O$:$G$"$k(B.
95:
96: @section alloca()
97:
98: $BH!?tFb$G:n6HNN0h$H$7$F;HMQ$5$l$k%a%b%j$O%9%?%C%/$+$i<h$k$N$,K>$^$7$$(B.
99: $BDL>o$3$l$O(B @code{alloca()} $B$K$h$j<B8=$5$l$k$,(B, $B%^%7%s$K$h$C$F$O(B
100: @code{alloca()} $B$r(B @code{malloc()} $B$r;H$C$F<B8=$7$F$$$k$b$N$b$"$k(B. $B$3(B
101: $B$N$h$&$J>l9g(B, GC $B$N4X78$G%H%i%V%k$N860x$H$J$k$N$G(B @code{alloca()} $B$NBe(B
102: $B$o$j$K(B @code{gc_malloc()} $B$r;H$&I,MW$,$"$k(B. $B$3$NA*Br$O(B,
103: @samp{include/ca.h} $B$G(B @code{ALLOCA()} $B$J$k%^%/%m$rDj5A$9$k$3$H$K$h$j(B
104: $B9T$J$o$l$k(B. $B$h$C$F(B, $B%?!<%2%C%H%^%7%s$N(B @code{alloca()} $B$,$I$N$h$&$K<B(B
105: $B8=$5$l$F$$$k$+$rD4$Y(B, $B$=$l$,%9%?%C%/$r;H$C$F$$$k$J$i$P(B
106:
107: @example
108: #define ALLOCA(d) alloca(d)
109: @end example
110:
111: @noindent
112: malloc() $B$r;H$C$F$$$k$J$i$P(B,
113:
114: @example
115: #define ALLOCA(d) alloca(d)
116: @end example
117:
118: @noindent
119: $B$H$9$k(B.
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>