From e2fe5ccfe8c74ac8fff7791b8d485d7925fccff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Sun, 4 May 2014 01:07:21 +0200 Subject: [PATCH] Docs: stub docs for cpu.architecture --- .../cpu/architecture/architecture-docs.factor | 18 ++++++++++++++++++ basis/cpu/architecture/architecture.factor | 7 ------- 2 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 basis/cpu/architecture/architecture-docs.factor diff --git a/basis/cpu/architecture/architecture-docs.factor b/basis/cpu/architecture/architecture-docs.factor new file mode 100644 index 0000000000..0cb5e4c803 --- /dev/null +++ b/basis/cpu/architecture/architecture-docs.factor @@ -0,0 +1,18 @@ +USING: help.markup help.syntax math ; +IN: cpu.architecture + +HELP: immediate-arithmetic? +{ $values { "n" number } { "?" "a boolean" } } +{ $description + "Can this value be an immediate operand for " { $link %add-imm } ", " + { $link %sub-imm } ", or " { $link %mul-imm } "?" +} ; + +HELP: machine-registers +{ $description "Mapping from register class to machine registers." } ; + +HELP: vm-stack-space +{ $description "Parameter space to reserve in anything making VM calls." } ; + +HELP: complex-addressing? +{ $description "Specifies if " { $link %slot } ", " { $link %set-slot } " and " { $link %write-barrier } " accept the 'scale' and 'tag' parameters, and if %load-memory and %store-memory work." } ; diff --git a/basis/cpu/architecture/architecture.factor b/basis/cpu/architecture/architecture.factor index 272e08ab80..dea379e86e 100644 --- a/basis/cpu/architecture/architecture.factor +++ b/basis/cpu/architecture/architecture.factor @@ -209,20 +209,15 @@ M: uint-4-rep scalar-rep-of drop uint-scalar-rep ; M: longlong-2-rep scalar-rep-of drop longlong-scalar-rep ; M: ulonglong-2-rep scalar-rep-of drop ulonglong-scalar-rep ; -! Mapping from register class to machine registers HOOK: machine-registers cpu ( -- assoc ) ! Callbacks are not allowed to clobber this HOOK: frame-reg cpu ( -- reg ) -! Parameter space to reserve in anything making VM calls HOOK: vm-stack-space cpu ( -- n ) M: object vm-stack-space 0 ; -! Specifies if %slot, %set-slot and %write-barrier accept the -! 'scale' and 'tag' parameters, and if %load-memory and -! %store-memory work HOOK: complex-addressing? cpu ( -- ? ) HOOK: gc-root-offset cpu ( spill-slot -- n ) @@ -528,8 +523,6 @@ HOOK: %loop-entry cpu ( -- ) ! and %load-vector? HOOK: fused-unboxing? cpu ( -- ? ) -! Can this value be an immediate operand for %add-imm, %sub-imm, -! or %mul-imm? HOOK: immediate-arithmetic? cpu ( n -- ? ) ! Can this value be an immediate operand for %and-imm, %or-imm,