diff --git a/basis/compiler/codegen/codegen.factor b/basis/compiler/codegen/codegen.factor index 7bdaace1db..7602295284 100755 --- a/basis/compiler/codegen/codegen.factor +++ b/basis/compiler/codegen/codegen.factor @@ -8,6 +8,7 @@ continuations.private fry cpu.architecture source-files.errors compiler.errors compiler.alien +compiler.constants compiler.cfg compiler.cfg.instructions compiler.cfg.stack-frame @@ -94,7 +95,9 @@ M: _dispatch generate-insn [ src>> register ] [ temp>> register ] bi %dispatch ; M: _dispatch-label generate-insn - label>> lookup-label %dispatch-label ; + label>> lookup-label + cell 0 <repetition> % + rc-absolute-cell label-fixup ; : >slot< ( insn -- dst obj slot tag ) { diff --git a/basis/cpu/architecture/architecture.factor b/basis/cpu/architecture/architecture.factor index 805ba4fd71..556424f50c 100644 --- a/basis/cpu/architecture/architecture.factor +++ b/basis/cpu/architecture/architecture.factor @@ -55,7 +55,6 @@ HOOK: %jump-label cpu ( label -- ) HOOK: %return cpu ( -- ) HOOK: %dispatch cpu ( src temp -- ) -HOOK: %dispatch-label cpu ( label -- ) HOOK: %slot cpu ( dst obj slot tag temp -- ) HOOK: %slot-imm cpu ( dst obj slot tag -- ) diff --git a/basis/cpu/ppc/ppc.factor b/basis/cpu/ppc/ppc.factor index 934b456075..003eccfa18 100644 --- a/basis/cpu/ppc/ppc.factor +++ b/basis/cpu/ppc/ppc.factor @@ -3,10 +3,11 @@ USING: accessors assocs sequences kernel combinators make math math.order math.ranges system namespaces locals layouts words alien alien.accessors alien.c-types literals cpu.architecture -cpu.ppc.assembler cpu.ppc.assembler.backend literals compiler.cfg.registers +cpu.ppc.assembler cpu.ppc.assembler.backend compiler.cfg.registers compiler.cfg.instructions compiler.constants compiler.codegen compiler.codegen.fixup compiler.cfg.intrinsics -compiler.cfg.stack-frame compiler.units ; +compiler.cfg.stack-frame compiler.cfg.build-stack-frame +compiler.units ; FROM: cpu.ppc.assembler => B ; IN: cpu.ppc @@ -461,16 +462,18 @@ M:: ppc %write-barrier ( src card# table -- ) src card# deck-bits SRWI table scratch-reg card# STBX ; -M: ppc %gc +M:: ppc %gc ( temp1 temp2 gc-roots gc-root-count -- ) "end" define-label - 12 load-zone-ptr - 11 12 cell LWZ ! nursery.here -> r11 - 12 12 3 cells LWZ ! nursery.end -> r12 - 11 11 1024 ADDI ! add ALLOT_BUFFER_ZONE to here - 11 0 12 CMP ! is here >= end? + temp2 load-zone-ptr + temp1 temp2 cell LWZ + temp2 temp2 3 cells LWZ + temp1 temp1 1024 ADDI ! add ALLOT_BUFFER_ZONE to here + temp1 0 temp2 CMP ! is here >= end? "end" get BLE %prepare-alien-invoke - "minor_gc" f %alien-invoke + 0 3 LI + 0 4 LI + "inline_gc" f %alien-invoke "end" resolve-label ; M: ppc %prologue ( n -- ) diff --git a/basis/cpu/x86/x86.factor b/basis/cpu/x86/x86.factor index ef353281e5..b3cb5b56ec 100644 --- a/basis/cpu/x86/x86.factor +++ b/basis/cpu/x86/x86.factor @@ -91,9 +91,6 @@ M: x86 %return ( -- ) 0 RET ; : align-code ( n -- ) 0 <repetition> % ; -M: x86 %dispatch-label ( label -- ) - 0 cell, rc-absolute-cell label-fixup ; - :: (%slot) ( obj slot tag temp -- op ) temp slot obj [+] LEA temp tag neg [+] ; inline