aboutsummaryrefslogtreecommitdiff
path: root/risugen
diff options
context:
space:
mode:
authorClaudio Fontana <claudio.fontana@huawei.com>2013-10-04 10:57:53 +0200
committerPeter Maydell <peter.maydell@linaro.org>2014-04-25 13:07:15 +0100
commitc668ba8ffe1f55904b0a04312a4cb606ef97307b (patch)
treefaf11d7631a79cf69dfeab319f913953a115440a /risugen
parent802538e827ae32d009e6354e69d2edfe5b487cd4 (diff)
aarch64.risu, risugen: add some comments
non-functional change. adds comments explaining problems, especially regarding load/stores. Signed-off-by: Claudio Fontana <claudio.fontana@linaro.org>
Diffstat (limited to 'risugen')
-rwxr-xr-xrisugen10
1 files changed, 7 insertions, 3 deletions
diff --git a/risugen b/risugen
index bcda2ac..0a2e758 100755
--- a/risugen
+++ b/risugen
@@ -494,13 +494,15 @@ sub write_memblock_setup()
# We just need to set r0 to point to a block of at least 2K length
# of random data, aligned to the maximum desired alignment (32).
- # XXX (claudio) 2K length in bytes? if so, the following is ok,
- # and is a change from before.
+ # XXX (claudio) the comment above says 2K. Is it length in bytes?
+ # if so, the following is ok, and is a change from before.
write_switch_to_arm();
my $align = $MAXALIGN;
my $datalen = 2048 + $align;
- die "bad alignment!" if ($align > 255) || !is_pow_of_2($align) || $align < 4;
+ if (($align > 255) || !is_pow_of_2($align) || $align < 4) {
+ die "bad alignment!";
+ }
# set r0 to (datablock + (align-1)) & ~(align-1)
# datablock is at PC + (4 * 4 instructions) = PC + 16
@@ -569,6 +571,7 @@ sub align($)
$alignment_restriction = $a;
}
+# XXX claudio: this seems to get the full address, not the offset.
sub write_get_offset()
{
# Emit code to get a random offset within the memory block, of the
@@ -714,6 +717,7 @@ sub gen_one_insn($$)
for my $tuple (@{ $rec->{fields} }) {
my ($var, $pos, $mask) = @$tuple;
my $val = ($insn >> $pos) & $mask;
+ # XXX (claudio) ARM-specific - maybe move to arm.risu?
# Check constraints here:
# not allowed to use or modify sp or pc
if (!$is_aarch64) {