narrowed down the problem area [naked asm]
Tomas Lindquist Olsen
tomas at famolsen.dk
Wed Oct 29 07:44:45 PDT 2008
Don wrote:
> Walter Bright wrote:
>> Don wrote:
>>> Why use 'naked' at all, then?
>>> (1) so that you can use the EBP register;
>>> (2) because non-naked asm doesn't work properly, either. If you pass
>>> an array into an asm function, you can't get the ".ptr" part of it,
>>> because the "ptr" conflicts with the asm "ptr" keyword. This is a big
>>> problem, since almost all asm functions that I write work on arrays.
>>
>> (3) you want to write the entire function in assembler.
>
> I think it probably should be illegal to include any non-asm code in a
> function containing naked asm. It would certainly make the spec simpler!
> In fact, I don't see how any other approach is really possible.
Seems sensible to me. Walter, why is normal code even allowed ?
More information about the Digitalmars-d
mailing list