Modifier | Constructor and Description |
---|---|
protected |
MetaAddressingMode(java.lang.String name,
Type dataType,
boolean exception,
boolean memoryReference,
boolean load,
boolean store,
int blockSize) |
|
MetaAddressingMode(java.lang.String name,
Type dataType,
java.util.Map<java.lang.String,MetaArgument> args,
boolean exception,
boolean memoryReference,
boolean load,
boolean store,
int blockSize)
Constructs a metadata object for an addressing mode.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addArgument(MetaArgument argument) |
boolean |
canThrowException()
Checks whether the addressing mode (its attributes) can throw an exception.
|
MetaArgument |
getArgument(java.lang.String name)
Return an argument of the given addressing mode that has the specified name.
|
java.util.Collection<java.lang.String> |
getArgumentNames()
Returns the list of addressing mode argument.
|
java.util.Collection<MetaArgument> |
getArguments()
Returns a collection of addressing mode arguments.
|
int |
getBlockSize()
Returns the size of block read or written to memory.
|
Type |
getDataType()
Returns the type of data accessed via the addressing mode.
|
java.lang.String |
getName()
Returns the name of the addressing mode.
|
boolean |
isArgumentDefined(java.lang.String name)
Checks whether the addressing mode has an argument with the specified name.
|
boolean |
isLoad()
Checks whether the addressing performs a memory load action in its attributes.
|
boolean |
isMemoryReference()
Checks whether the addressing mode provides refers to memory
(provides an access to memory via its return expression).
|
boolean |
isStore()
Checks whether the addressing mode performs a memory store action.
|
java.lang.String |
toString() |
public MetaAddressingMode(java.lang.String name, Type dataType, java.util.Map<java.lang.String,MetaArgument> args, boolean exception, boolean memoryReference, boolean load, boolean store, int blockSize)
name
- Addressing mode name.dataType
- the type of data accessed via the addressing mode.args
- Table of addressing mode arguments.exception
- true
if the addressing mode can throw
an exception or false
otherwise.memoryReference
- true
if the addressing mode
provides access to memory or false
otherwise.load
- store
- blockSize
- java.lang.IllegalArgumentException
- if any of the parameters is null
.protected MetaAddressingMode(java.lang.String name, Type dataType, boolean exception, boolean memoryReference, boolean load, boolean store, int blockSize)
protected final void addArgument(MetaArgument argument)
public final java.lang.String getName()
public final Type getDataType()
getDataType
in interface MetaData
public final java.util.Collection<MetaArgument> getArguments()
public final MetaArgument getArgument(java.lang.String name)
name
- Argument name.null
if no such
argument is defined.public final java.util.Collection<java.lang.String> getArgumentNames()
public final boolean isArgumentDefined(java.lang.String name)
name
- Argument name.true
if the argument is defined of false
otherwise.public final boolean canThrowException()
true
if the addressing mode can throw an exception
or false
otherwise.public final boolean isMemoryReference()
true
if the addressing mode provides an reference to memory
or false
otherwise.public final boolean isLoad()
isMemoryReference
must be used.true
if the addressing mode performs a memory load action
or false
otherwise.public final boolean isStore()
isMemoryReference
must be used.true
if the addressing mode performs a memory store action
or false
otherwise.public final int getBlockSize()
public final java.lang.String toString()
toString
in class java.lang.Object