NAME
SIRTX::VM::Register - module for interacting with SIRTX VM code
VERSION
version v0.08
SYNOPSIS
use SIRTX::VM::Register;
This package inherits from Data::Identifier::Interface::Userdata.
METHODS
physical
my $physical = $register->physical;
Returns the physical number of the register.
name
my $name = $register->name;
Returns the name of the register.
owner
my $owner = $register->owner;
$register->owner($owner);
# e.g:
$register->owner(SIRTX::VM::Register::OWNER_YOURS());
Gets or sets the register owner.
temperature
my $temperature = $register->temperature;
$register->temperature($temperature);
# e.g.:
$register->temperature(SIRTX::VM::Register::TEMPERATURE_HOT());
Gets or sets the register temperature.
clone
my SIRTX::VM::Register $clone = $register->clone;
Clones the register.
CONSTANTS
Type
Each register has a type, which is a read only property. The following values are supported:
SIRTX::VM::Register::TYPE_USER()-
The register is a user register. It's meaning is defined by the user/application.
SIRTX::VM::Register::TYPE_SYSTEM()-
The register is a system register. It's meaning is defined by the formal specification and must not be used in any other way.
Owner
Each register has a owner. The owner is a read-write property that defines who currently owns the register.
SIRTX::VM::Register::OWNER_MINE()-
The register is owned by the user/application. The application may use the register anyway it pleases.
This is the default.
SIRTX::VM::Register::OWNER_YOURS()-
The register is currently owned by the assembler. The assembler is free to use the register as sees fit. The user/application is not allowed to alter the content of the register (unless specifically documented).
SIRTX::VM::Register::OWNER_THEIRS()-
The register is owned by external code (such as a library). Both user/application and assembler are not allowed to alter the register.
Temperature
The register temperature tells how much a register is currently used. This is a read-write property. This is used by the assembler to optimise code.
SIRTX::VM::Register::TEMPERATURE_COLD()-
The register is currently not or only rarely used.
SIRTX::VM::Register::TEMPERATURE_LUKEWARM()-
The register is used sometimes.
This is the default.
SIRTX::VM::Register::TEMPERATURE_HOT()-
The register is currently in active use.
AUTHOR
Löwenfelsen UG (haftungsbeschränkt) <support@loewenfelsen.net>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2024-2025 by Löwenfelsen UG (haftungsbeschränkt) <support@loewenfelsen.net>.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)