1 ! Copyright (C) 2005, 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors assocs sequences kernel combinators make math
4 math.order math.ranges system namespaces locals layouts words
5 alien alien.accessors alien.c-types alien.data literals cpu.architecture
6 cpu.ppc.assembler cpu.ppc.assembler.backend compiler.cfg.registers
7 compiler.cfg.instructions compiler.cfg.comparisons
8 compiler.codegen.fixup compiler.cfg.intrinsics
9 compiler.cfg.stack-frame compiler.cfg.build-stack-frame
10 compiler.units compiler.constants compiler.codegen ;
11 FROM: cpu.ppc.assembler => B ;
15 ! PowerPC register assignments:
16 ! r2-r12: integer vregs
18 ! r30: integer scratch
22 ! Add some methods to the assembler that are useful to us
23 M: label (B) [ 0 ] 2dip (B) rc-relative-ppc-3 label-fixup ;
24 M: label BC [ 0 BC ] dip rc-relative-ppc-2 label-fixup ;
26 enable-float-intrinsics
29 \ ##integer>float t frame-required? set-word-prop
30 \ ##float>integer t frame-required? set-word-prop
33 M: ppc machine-registers
35 { int-regs $[ 2 12 [a,b] 15 29 [a,b] append ] }
36 { float-regs $[ 0 29 [a,b] ] }
39 CONSTANT: scratch-reg 30
40 CONSTANT: fp-scratch-reg 30
42 M: ppc two-operand? f ;
44 M: ppc %load-immediate ( reg n -- ) swap LOAD ;
46 M: ppc %load-reference ( reg obj -- )
47 [ 0 swap LOAD32 ] [ rc-absolute-ppc-2/2 rel-immediate ] bi* ;
49 M: ppc %alien-global ( register symbol dll -- )
50 [ 0 swap LOAD32 ] 2dip rc-absolute-ppc-2/2 rel-dlsym ;
55 GENERIC: loc-reg ( loc -- reg )
57 M: ds-loc loc-reg drop ds-reg ;
58 M: rs-loc loc-reg drop rs-reg ;
60 : loc>operand ( loc -- reg n )
61 [ loc-reg ] [ n>> cells neg ] bi ; inline
63 M: ppc %peek loc>operand LWZ ;
64 M: ppc %replace loc>operand STW ;
66 :: (%inc) ( n reg -- ) reg reg n cells ADDI ; inline
68 M: ppc %inc-d ( n -- ) ds-reg (%inc) ;
69 M: ppc %inc-r ( n -- ) rs-reg (%inc) ;
71 HOOK: reserved-area-size os ( -- n )
73 ! The start of the stack frame contains the size of this frame
74 ! as well as the currently executing XT
75 : factor-area-size ( -- n ) 2 cells ; foldable
76 : next-save ( n -- i ) cell - ;
77 : xt-save ( n -- i ) 2 cells - ;
79 ! Next, we have the spill area as well as the FFI parameter area.
80 ! It is safe for them to overlap, since basic blocks with FFI calls
81 ! will never spill -- indeed, basic blocks with FFI calls do not
82 ! use vregs at all, and the FFI call is a stack analysis sync point.
83 ! In the future this will change and the stack frame logic will
84 ! need to be untangled somewhat.
86 : param@ ( n -- x ) reserved-area-size + ; inline
88 : param-save-size ( -- n ) 8 cells ; foldable
91 reserved-area-size param-save-size + + ; inline
93 : spill@ ( n -- offset )
96 ! Some FP intrinsics need a temporary scratch area in the stack
97 ! frame, 8 bytes in size. This is in the param-save area so it
98 ! does not overlap with spill slots.
99 : scratch@ ( n -- offset )
103 : gc-root@ ( n -- offset )
104 gc-root-offset local@ ;
106 ! Finally we have the linkage area
107 HOOK: lr-save os ( -- n )
109 M: ppc stack-frame-size ( stack-frame -- i )
116 M: ppc %call ( word -- ) 0 BL rc-relative-ppc-3 rel-word-pic ;
118 M: ppc %jump ( word -- )
119 0 6 LOAD32 8 rc-absolute-ppc-2/2 rel-here
120 0 B rc-relative-ppc-3 rel-word-pic-tail ;
122 M: ppc %jump-label ( label -- ) B ;
123 M: ppc %return ( -- ) BLR ;
125 M:: ppc %dispatch ( src temp -- )
127 4 cells rc-absolute-ppc-2/2 rel-here
132 :: (%slot) ( obj slot tag temp -- reg offset )
134 temp tag neg ; inline
136 : (%slot-imm) ( obj slot tag -- reg offset )
137 [ cells ] dip - ; inline
139 M: ppc %slot ( dst obj slot tag temp -- ) (%slot) LWZ ;
140 M: ppc %slot-imm ( dst obj slot tag -- ) (%slot-imm) LWZ ;
141 M: ppc %set-slot ( src obj slot tag temp -- ) (%slot) STW ;
142 M: ppc %set-slot-imm ( src obj slot tag -- ) (%slot-imm) STW ;
144 M:: ppc %string-nth ( dst src index temp -- )
148 dst temp string-offset LBZ
151 temp src string-aux-offset LWZ
154 temp temp byte-array-offset LHZ
160 M:: ppc %set-string-nth-fast ( ch obj index temp -- )
162 ch temp string-offset STB ;
165 M: ppc %add-imm ADDI ;
166 M: ppc %sub swap SUBF ;
167 M: ppc %sub-imm SUBI ;
169 M: ppc %mul-imm MULLI ;
171 M: ppc %and-imm ANDI ;
175 M: ppc %xor-imm XORI ;
177 M: ppc %shl-imm swapd SLWI ;
179 M: ppc %shr-imm swapd SRWI ;
181 M: ppc %sar-imm SRAWI ;
184 :: overflow-template ( label dst src1 src2 insn -- )
187 dst src2 src1 insn call
190 M: ppc %fixnum-add ( label dst src1 src2 -- )
191 [ ADDO. ] overflow-template ;
193 M: ppc %fixnum-sub ( label dst src1 src2 -- )
194 [ SUBFO. ] overflow-template ;
196 M: ppc %fixnum-mul ( label dst src1 src2 -- )
197 [ MULLWO. ] overflow-template ;
199 : bignum@ ( n -- offset ) cells bignum tag-number - ; inline
201 M:: ppc %integer>bignum ( dst src temp -- )
204 dst 0 >bignum %load-reference
205 ! Is it zero? Then just go to the end and return this zero
209 dst 4 cells bignum temp %allot
212 temp dst 1 bignum@ STW
215 temp temp cell-bits 1 - SRAWI
218 temp dst 2 bignum@ STW
219 ! Make negative value positive
225 temp dst 3 bignum@ STW
229 M:: ppc %bignum>integer ( dst src temp -- )
232 temp src 1 bignum@ LWZ
233 ! if the length is 1, its just the sign and nothing else,
236 0 temp 1 tag-fixnum CMPI
239 dst src 3 bignum@ LWZ
241 temp src 2 bignum@ LWZ
242 ! branchless arithmetic: we want to turn 0 into 1,
247 ! multiply value by sign
252 M: ppc %add-float FADD ;
253 M: ppc %sub-float FSUB ;
254 M: ppc %mul-float FMUL ;
255 M: ppc %div-float FDIV ;
257 M:: ppc %integer>float ( dst src -- )
258 HEX: 4330 scratch-reg LIS
259 scratch-reg 1 0 scratch@ STW
261 scratch-reg dup HEX: 8000 XORIS
262 scratch-reg 1 4 scratch@ STW
264 scratch-reg 4503601774854144.0 %load-reference
265 fp-scratch-reg scratch-reg float-offset LFD
266 dst dst fp-scratch-reg FSUB ;
268 M:: ppc %float>integer ( dst src -- )
269 fp-scratch-reg src FCTIWZ
270 fp-scratch-reg 1 0 scratch@ STFD
271 dst 1 4 scratch@ LWZ ;
273 M: ppc %copy ( dst src rep -- )
276 { double-rep [ FMR ] }
279 M: ppc %unbox-float ( dst src -- ) float-offset LFD ;
281 M:: ppc %box-float ( dst src temp -- )
282 dst 16 float temp %allot
283 src dst float-offset STFD ;
285 : float-function-param ( i spill-slot -- )
286 [ float-regs param-regs nth 1 ] [ n>> spill@ ] bi* LFD ;
288 : float-function-return ( reg -- )
289 float-regs return-reg 2dup = [ 2drop ] [ FMR ] if ;
291 M:: ppc %unary-float-function ( dst src func -- )
292 0 src float-function-param
294 dst float-function-return ;
296 M:: ppc %binary-float-function ( dst src1 src2 func -- )
297 0 src1 float-function-param
298 1 src2 float-function-param
300 dst float-function-return ;
302 ! Internal format is always double-precision on PowerPC
303 M: ppc %single>double-float FMR ;
305 M: ppc %double>single-float FMR ;
307 M: ppc %unbox-alien ( dst src -- )
310 M:: ppc %unbox-any-c-ptr ( dst src temp -- )
312 { "is-byte-array" "end" "start" } [ define-label ] each
313 ! Address is computed in dst
315 ! Load object into scratch-reg
317 ! We come back here with displaced aliens
318 "start" resolve-label
320 0 scratch-reg \ f tag-number CMPI
323 ! Is the object an alien?
324 0 scratch-reg header-offset LWZ
325 0 0 alien type-number tag-fixnum CMPI
326 "is-byte-array" get BNE
327 ! If so, load the offset
328 0 scratch-reg alien-offset LWZ
329 ! Add it to address being computed
331 ! Now recurse on the underlying alien
332 scratch-reg scratch-reg underlying-alien-offset LWZ
334 "is-byte-array" resolve-label
335 ! Add byte array address to address being computed
336 dst dst scratch-reg ADD
337 ! Add an offset to start of byte array's data area
338 dst dst byte-array-offset ADDI
342 : alien@ ( n -- n' ) cells object tag-number - ;
344 :: %allot-alien ( dst displacement base temp -- )
345 dst 4 cells alien temp %allot
346 temp \ f tag-number %load-immediate
347 ! Store underlying-alien slot
348 base dst 1 alien@ STW
350 temp dst 2 alien@ STW
352 displacement dst 3 alien@ STW ;
354 M:: ppc %box-alien ( dst src temp -- )
357 dst \ f tag-number %load-immediate
360 dst src temp temp %allot-alien
364 M:: ppc %box-displaced-alien ( dst displacement base displacement' base' base-class -- )
368 "simple-case" define-label
369 ! If displacement is zero, return the base
371 0 displacement 0 CMPI
373 ! Quickly use displacement' before its needed for real, as allot temporary
374 displacement' :> temp
375 dst 4 cells alien temp %allot
376 ! If base is already a displaced alien, unpack it
377 0 base \ f tag-number CMPI
378 "simple-case" get BEQ
379 temp base header-offset LWZ
380 0 temp alien type-number tag-fixnum CMPI
381 "simple-case" get BNE
382 ! displacement += base.displacement
383 temp base 3 alien@ LWZ
384 displacement' displacement temp ADD
386 base' base 1 alien@ LWZ
388 "simple-case" resolve-label
389 displacement' displacement MR
391 "alloc" resolve-label
392 ! Store underlying-alien slot
393 base' dst 1 alien@ STW
395 displacement' dst 3 alien@ STW
396 ! Store expired slot (its ok to clobber displacement')
397 temp \ f tag-number %load-immediate
398 temp dst 2 alien@ STW
402 M: ppc %alien-unsigned-1 0 LBZ ;
403 M: ppc %alien-unsigned-2 0 LHZ ;
405 M: ppc %alien-signed-1 dupd 0 LBZ dup EXTSB ;
406 M: ppc %alien-signed-2 0 LHA ;
408 M: ppc %alien-cell 0 LWZ ;
410 M: ppc %alien-float 0 LFS ;
411 M: ppc %alien-double 0 LFD ;
413 M: ppc %set-alien-integer-1 swap 0 STB ;
414 M: ppc %set-alien-integer-2 swap 0 STH ;
416 M: ppc %set-alien-cell swap 0 STW ;
418 M: ppc %set-alien-float swap 0 STFS ;
419 M: ppc %set-alien-double swap 0 STFD ;
421 : load-zone-ptr ( reg -- )
422 "nursery" f %alien-global ;
424 : load-allot-ptr ( nursery-ptr allot-ptr -- )
425 [ drop load-zone-ptr ] [ swap 4 LWZ ] 2bi ;
427 :: inc-allot-ptr ( nursery-ptr allot-ptr n -- )
428 scratch-reg allot-ptr n 8 align ADDI
429 scratch-reg nursery-ptr 4 STW ;
431 :: store-header ( dst class -- )
432 class type-number tag-fixnum scratch-reg LI
433 scratch-reg dst 0 STW ;
435 : store-tagged ( dst tag -- )
436 dupd tag-number ORI ;
438 M:: ppc %allot ( dst size class nursery-ptr -- )
439 nursery-ptr dst load-allot-ptr
440 nursery-ptr dst size inc-allot-ptr
441 dst class store-header
442 dst class store-tagged ;
444 : load-cards-offset ( dst -- )
445 [ "cards_offset" f %alien-global ] [ dup 0 LWZ ] bi ;
447 : load-decks-offset ( dst -- )
448 [ "decks_offset" f %alien-global ] [ dup 0 LWZ ] bi ;
450 M:: ppc %write-barrier ( src card# table -- )
451 card-mark scratch-reg LI
454 table load-cards-offset
455 src card# card-bits SRWI
456 table scratch-reg card# STBX
459 table load-decks-offset
460 src card# deck-bits SRWI
461 table scratch-reg card# STBX ;
463 M:: ppc %check-nursery ( label temp1 temp2 -- )
466 temp2 temp2 3 cells LWZ
467 ! add ALLOT_BUFFER_ZONE to here
468 temp1 temp1 1024 ADDI
473 M:: ppc %save-gc-root ( gc-root register -- )
474 register 1 gc-root gc-root@ STW ;
476 M:: ppc %load-gc-root ( gc-root register -- )
477 register 1 gc-root gc-root@ LWZ ;
479 M:: ppc %call-gc ( gc-root-count -- )
480 3 1 gc-root-base local@ ADDI
482 "inline_gc" f %alien-invoke ;
484 M: ppc %prologue ( n -- )
485 0 11 LOAD32 rc-absolute-ppc-2/2 rel-this
488 [ [ 1 1 ] dip neg ADDI ]
489 [ [ 11 1 ] dip xt-save STW ]
491 [ [ 11 1 ] dip next-save STW ]
492 [ [ 0 1 ] dip lr-save + STW ]
495 M: ppc %epilogue ( n -- )
496 #! At the end of each word that calls a subroutine, we store
497 #! the previous link register value in r0 by popping it off
498 #! the stack, set the link register to the contents of r0,
499 #! and jump to the link register.
500 [ [ 0 1 ] dip lr-save + LWZ ]
501 [ [ 1 1 ] dip ADDI ] bi
504 :: (%boolean) ( dst temp branch1 branch2 -- )
506 dst \ f tag-number %load-immediate
507 "end" get branch1 execute( label -- )
508 branch2 [ "end" get branch2 execute( label -- ) ] when
509 dst \ t %load-reference
510 "end" get resolve-label ; inline
512 :: %boolean ( dst cc temp -- )
513 cc negate-cc order-cc {
514 { cc< [ dst temp \ BLT f (%boolean) ] }
515 { cc<= [ dst temp \ BLE f (%boolean) ] }
516 { cc> [ dst temp \ BGT f (%boolean) ] }
517 { cc>= [ dst temp \ BGE f (%boolean) ] }
518 { cc= [ dst temp \ BEQ f (%boolean) ] }
519 { cc/= [ dst temp \ BNE f (%boolean) ] }
522 : (%compare) ( src1 src2 -- ) [ 0 ] dip CMP ; inline
523 : (%compare-imm) ( src1 src2 -- ) [ 0 ] 2dip CMPI ; inline
524 : (%compare-float-unordered) ( src1 src2 -- ) [ 0 ] dip FCMPU ; inline
525 : (%compare-float-ordered) ( src1 src2 -- ) [ 0 ] dip FCMPO ; inline
527 :: (%compare-float) ( src1 src2 cc compare -- branch1 branch2 )
529 { cc< [ src1 src2 \ compare execute( a b -- ) \ BLT f ] }
530 { cc<= [ src1 src2 \ compare execute( a b -- ) \ BLT \ BEQ ] }
531 { cc> [ src1 src2 \ compare execute( a b -- ) \ BGT f ] }
532 { cc>= [ src1 src2 \ compare execute( a b -- ) \ BGT \ BEQ ] }
533 { cc= [ src1 src2 \ compare execute( a b -- ) \ BEQ f ] }
534 { cc<> [ src1 src2 \ compare execute( a b -- ) \ BLT \ BGT ] }
535 { cc<>= [ src1 src2 \ compare execute( a b -- ) \ BNO f ] }
536 { cc/< [ src1 src2 \ compare execute( a b -- ) \ BGE f ] }
537 { cc/<= [ src1 src2 \ compare execute( a b -- ) \ BGT \ BO ] }
538 { cc/> [ src1 src2 \ compare execute( a b -- ) \ BLE f ] }
539 { cc/>= [ src1 src2 \ compare execute( a b -- ) \ BLT \ BO ] }
540 { cc/= [ src1 src2 \ compare execute( a b -- ) \ BNE f ] }
541 { cc/<> [ src1 src2 \ compare execute( a b -- ) \ BEQ \ BO ] }
542 { cc/<>= [ src1 src2 \ compare execute( a b -- ) \ BO f ] }
545 M: ppc %compare [ (%compare) ] 2dip %boolean ;
547 M: ppc %compare-imm [ (%compare-imm) ] 2dip %boolean ;
549 M:: ppc %compare-float-ordered ( dst src1 src2 cc temp -- )
550 src1 src2 cc negate-cc \ (%compare-float-ordered) (%compare-float) :> branch2 :> branch1
551 dst temp branch1 branch2 (%boolean) ;
553 M:: ppc %compare-float-unordered ( dst src1 src2 cc temp -- )
554 src1 src2 cc negate-cc \ (%compare-float-unordered) (%compare-float) :> branch2 :> branch1
555 dst temp branch1 branch2 (%boolean) ;
557 :: %branch ( label cc -- )
559 { cc< [ label BLT ] }
560 { cc<= [ label BLE ] }
561 { cc> [ label BGT ] }
562 { cc>= [ label BGE ] }
563 { cc= [ label BEQ ] }
564 { cc/= [ label BNE ] }
567 M:: ppc %compare-branch ( label src1 src2 cc -- )
571 M:: ppc %compare-imm-branch ( label src1 src2 cc -- )
572 src1 src2 (%compare-imm)
575 :: (%branch) ( label branch1 branch2 -- )
576 label branch1 execute( label -- )
577 branch2 [ label branch2 execute( label -- ) ] when ; inline
579 M:: ppc %compare-float-ordered-branch ( label src1 src2 cc -- )
580 src1 src2 cc \ (%compare-float-ordered) (%compare-float) :> branch2 :> branch1
581 label branch1 branch2 (%branch) ;
583 M:: ppc %compare-float-unordered-branch ( label src1 src2 cc -- )
584 src1 src2 cc \ (%compare-float-unordered) (%compare-float) :> branch2 :> branch1
585 label branch1 branch2 (%branch) ;
587 : load-from-frame ( dst n rep -- )
589 { int-rep [ [ 1 ] dip LWZ ] }
590 { float-rep [ [ 1 ] dip LFS ] }
591 { double-rep [ [ 1 ] dip LFD ] }
592 { stack-params [ [ 0 1 ] dip LWZ [ 0 1 ] dip param@ STW ] }
595 : next-param@ ( n -- x ) param@ stack-frame get total-size>> + ;
597 : store-to-frame ( src n rep -- )
599 { int-rep [ [ 1 ] dip STW ] }
600 { float-rep [ [ 1 ] dip STFS ] }
601 { double-rep [ [ 1 ] dip STFD ] }
602 { stack-params [ [ [ 0 1 ] dip next-param@ LWZ 0 1 ] dip STW ] }
605 M: ppc %spill ( src rep n -- )
606 swap [ spill@ ] dip store-to-frame ;
608 M: ppc %reload ( dst rep n -- )
609 swap [ spill@ ] dip load-from-frame ;
613 M: int-regs return-reg drop 3 ;
614 M: int-regs param-regs drop { 3 4 5 6 7 8 9 10 } ;
615 M: float-regs return-reg drop 1 ;
617 M:: ppc %save-param-reg ( stack reg rep -- )
618 reg stack local@ rep store-to-frame ;
620 M:: ppc %load-param-reg ( stack reg rep -- )
621 reg stack local@ rep load-from-frame ;
623 M: ppc %prepare-unbox ( -- )
624 ! First parameter is top of stack
626 ds-reg dup cell SUBI ;
628 M: ppc %unbox ( n rep func -- )
629 ! Value must be in r3
632 ! Store the return value on the C stack
633 over [ [ reg-class-of return-reg ] keep %save-param-reg ] [ 2drop ] if ;
635 M: ppc %unbox-long-long ( n func -- )
636 ! Value must be in r3:r4
639 ! Store the return value on the C stack
641 [ [ 3 1 ] dip local@ STW ]
642 [ [ 4 1 ] dip cell + local@ STW ] bi
645 M: ppc %unbox-large-struct ( n c-type -- )
646 ! Value must be in r3
647 ! Compute destination address and load struct size
648 [ [ 4 1 ] dip local@ ADDI ] [ heap-size 5 LI ] bi*
650 "to_value_struct" f %alien-invoke ;
652 M: ppc %box ( n rep func -- )
653 ! If the source is a stack location, load it into freg #0.
654 ! If the source is f, then we assume the value is already in
656 [ over [ 0 over reg-class-of param-reg swap %load-param-reg ] [ 2drop ] if ] dip
659 M: ppc %box-long-long ( n func -- )
662 [ [ 3 1 ] dip local@ LWZ ]
663 [ [ 4 1 ] dip cell + local@ LWZ ] bi
665 ] dip f %alien-invoke ;
667 : struct-return@ ( n -- n )
668 [ stack-frame get params>> ] unless* local@ ;
670 M: ppc %prepare-box-struct ( -- )
671 #! Compute target address for value struct return
672 3 1 f struct-return@ ADDI
675 M: ppc %box-large-struct ( n c-type -- )
676 ! If n = f, then we're boxing a returned struct
677 ! Compute destination address and load struct size
678 [ [ 3 1 ] dip struct-return@ ADDI ] [ heap-size 4 LI ] bi*
680 "box_value_struct" f %alien-invoke ;
682 M:: ppc %save-context ( temp1 temp2 callback-allowed? -- )
683 #! Save Factor stack pointers in case the C code calls a
684 #! callback which does a GC, which must reliably trace
686 temp1 "stack_chain" f %alien-global
694 M: ppc %alien-invoke ( symbol dll -- )
695 [ 11 ] 2dip %alien-global 11 MTLR BLRL ;
697 M: ppc %alien-callback ( quot -- )
698 3 swap %load-reference "c_to_factor" f %alien-invoke ;
700 M: ppc %prepare-alien-indirect ( -- )
701 "unbox_alien" f %alien-invoke
704 M: ppc %alien-indirect ( -- )
707 M: ppc %callback-value ( ctype -- )
708 ! Save top of data stack
711 ! Restore data/call/retain stacks
712 "unnest_stacks" f %alien-invoke
713 ! Restore top of data stack
715 ! Unbox former top of data stack to return registers
718 M: ppc small-enough? ( n -- ? ) -32768 32767 between? ;
720 M: ppc return-struct-in-registers? ( c-type -- ? )
721 c-type return-in-registers?>> ;
723 M: ppc %box-small-struct ( c-type -- )
724 #! Box a <= 16-byte struct returned in r3:r4:r5:r6
726 "box_medium_struct" f %alien-invoke ;
728 : %unbox-struct-1 ( -- )
729 ! Alien must be in r3.
730 "alien_offset" f %alien-invoke
733 : %unbox-struct-2 ( -- )
734 ! Alien must be in r3.
735 "alien_offset" f %alien-invoke
739 : %unbox-struct-4 ( -- )
740 ! Alien must be in r3.
741 "alien_offset" f %alien-invoke
747 M: ppc %unbox-small-struct ( size -- )
748 #! Alien must be in EAX.
749 heap-size cell align cell /i {
750 { 1 [ %unbox-struct-1 ] }
751 { 2 [ %unbox-struct-2 ] }
752 { 4 [ %unbox-struct-4 ] }
755 enable-float-functions
760 { [ os macosx? ] [ "cpu.ppc.macosx" require ] }
761 { [ os linux? ] [ "cpu.ppc.linux" require ] }
764 "complex-double" c-type t >>return-in-registers? drop
768 [ alien-unsigned-4 c-bool> ] >>getter
769 [ [ >c-bool ] 2dip set-alien-unsigned-4 ] >>setter
772 "box_boolean" >>boxer
773 "to_boolean" >>unboxer
774 bool define-primitive-type
775 ] with-compilation-unit