[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Firebee Coldfire MiNT Kernel and NFS

Hash: SHA256

On 2014-09-04 18:38, Vincent Rivière wrote:
> By chance, "BSET.B #7" is a totally standard user mode instruction,
> and does exactly the same job as TAS on monoprocessor systems. So I
> replaced that instruction.
> Then... The NFS client works perfectly in the FireBee now. And it
> is fast :-D

Wow!  Good catch.

Just for the record, TAS and BSET are not interchangeable with regard
to the flags (from the Motorola 68000 Programmer's Reference Manual):



"Description: Tests and sets the byte operand addressed by the
effective address field. The
instruction tests the current value of the operand and sets the N and
Z condition bits
appropriately. TAS also sets the high-order bit of the operand. The
operation uses a
locked or read-modify-write transfer sequence. This instruction
supports use of a flag
or semaphore to coordinate several processors."

Condition Codes:
X - Not affected.
N - Set if the most significant bit of the operand is currently set;
cleared otherwise.
Z - Set if the operand was zero; cleared otherwise.
V - Always cleared.
C - Always cleared.


"Tests a bit in the destination operand and sets the Z condition code
appropriately, then sets the specified bit in the destination operand.
When a data
register is the destination, any of the 32 bits can be specified by a
modulo 32-bit
number. When a memory location is the destination, the operation is a
byte operation,
and the bit number is modulo 8. In all cases, bit zero refers to the
least significant bit.
The bit number for this operation can be specified in either of two ways:
1. Immediate - The bit number is specified in the second word of the
2. Register - The specified data register contains the bit number."

Condition Codes:
X - Not affected.
N - Not affected.
Z - Set if the bit tested is zero; cleared otherwise.
V - Not affected.
C - Not affected.


Not having looked at the relevant source code, I guess you knew that
already.  :-)  Again:  good job!!!

Version: GnuPG v1