Re: [Gems-users] Ruby 1.4 magic_instruction_callback function


Date: Thu, 22 Mar 2007 14:44:15 -0500 (CDT)
From: bobba@xxxxxxxxxxx
Subject: Re: [Gems-users] Ruby 1.4 magic_instruction_callback function
James,

The sethi instruction used for magic calls has space for 22 bits in its
immediate operand field. I am not sure why the magic call numbers were
left shifted by 16 initially. My guess is that by left-shifting, you could
make magic call number 4 to correspond to simics break point value
(0x40000). The 16-bit left shift leaves us with 6 bits for magic call
numbers (0-63) and hence the 20 to 40 bound.

In order to increase the range of available transaction ids, it was
decided to do away with the left shift and change the range of transaction
ids.
So if you decide to work with 1024-2048, then you should remove the left
shift in the assembly macro. Else if you would like to work with 20-40,
you could change the commands.C file instead. In either case, the numbers
used with assembly macros must be consistent with the numbers in
commands.C.  Simics magic break point instruction should have 0x40000 in
the immediate operand field.

Jayaram

> In the Ruby 1.4 release, the bounds for beginning and committing
> transactions has been changed from 20 and 40 to 1024 and 2048 respectively
> in the magic_instruction_callback function within the commands.C file.
> These larger numbers, however, result in an bounds problem in the
> assembler
> when combined with the 16 bit left shift in the suggested assembly for
> starting and ending transactions.
>
> One potential way to resolve this issue is to revert the transaction
> begin/commit bounds in the commands.C file back to their original 20/40
> values.  Instead of this, I was wondering if it is correct to simply NOT
> shift the id value left by 16 bits for transaction ids (>1025)?  There is
> a
> check in the commands.C file that only shifts back right values that have
> been shifted left.
>
> What was the original reason for shifting magic instructions values left
> 16,
> and is it OK to NOT perform this shift when passing id's for begin/end
> transactions?
> _______________________________________________
> Gems-users mailing list
> Gems-users@xxxxxxxxxxx
> https://lists.cs.wisc.edu/mailman/listinfo/gems-users
> Use Google to search the GEMS Users mailing list by adding
> "site:https://lists.cs.wisc.edu/archive/gems-users/"; to your search.
>
>


[← Prev in Thread] Current Thread [Next in Thread→]