Timon Gehr Wrote:
> Timon Gehr wrote:
> > On 07/06/2011 00:20, Timon Gehr wrote:
> >
> >> I'd much prefer the behavior to be defined as 1< >> 1<<(0x1f&x); (That's what D effectively does during runtime. It is also
> >> what
> >> the machine code supports, at least in x87).
> >
> > Defining the b
Am 09.06.2011 09:08, schrieb Don:
s_lange wrote:
As of yet, there are only general-pupose integer rotate instructions
on x86 processors, and very few other CPUs and µCs actually implement
rotate instructions.
Really? Itanium, PowerPC, ARM, 6502, Z80, PIC all have rotate
instructions. I've nev
Timon Gehr wrote:
> On 07/06/2011 00:20, Timon Gehr wrote:
>
>> I'd much prefer the behavior to be defined as 1<> 1<<(0x1f&x); (That's what D effectively does during runtime. It is also what
>> the machine code supports, at least in x87).
>
> Defining the behaviour to match that of one brand of pr
On 07/06/2011 00:20, Timon Gehr wrote:
I'd much prefer the behavior to be defined as 1<
Defining the behaviour to match that of one brand of processor would be arbitrary and
confusing. Why not define it just to shift by the requested number of bits?
Any extra processor instructions to make
s_lange wrote:
Am 07.06.2011 01:20, schrieb Timon Gehr:
I'd much prefer the behavior to be defined as 1<1<<(0x1f&x); (That's what D effectively does during runtime. It is
also what
the machine code supports, at least in x87).
Well, you probably mean what x86 processors do.
The behaviour of x
Am 07.06.2011 01:20, schrieb Timon Gehr:
I'd much prefer the behavior to be defined as 1<
Well, you probably mean what x86 processors do.
The behaviour of x86 processors in this regard is (at leas) well
defined, but not uniform. It all depends whether you use general-purpose
integer instructio
Vladimir Panteleev wrote:
> On Tue, 07 Jun 2011 02:20:17 +0300, Timon Gehr wrote:
>
>> I'd much prefer the behavior to be defined as 1<> 1<<(0x1f&x); (That's what D effectively does during runtime. It is also
>> what the machine code supports, at least in x87).
>
> Can you think of any cases wher
On Tue, 07 Jun 2011 02:20:17 +0300, Timon Gehr wrote:
Currently, the behavior of a shift by more than the size in bytes of the
operand is undefined. (Well, it's an 'error', but unchecked.)
Also see http://d.puremagic.com/issues/show_bug.cgi?id=4887
--
Best regards,
Vladimir
On Tue, 07 Jun 2011 02:20:17 +0300, Timon Gehr wrote:
I'd much prefer the behavior to be defined as 1<1<<(0x1f&x); (That's what D effectively does during runtime. It is also
what the machine code supports, at least in x87).
Can you think of any cases where this overflow behavior would be ex
Currently, the behavior of a shift by more than the size in bytes of the
operand is undefined. (Well, it's an 'error', but unchecked.)
int x=32;
x=1<
10 matches
Mail list logo