dmd icon indicating copy to clipboard operation
dmd copied to clipboard

Fix Issues 23130, 19528 : Inline asm was too liberal about operand si…

Open maxhaton opened this issue 2 years ago • 10 comments

…zes.

A 8-byte type was only considered 8 bytes in 64 bit code, for some reason. This led to inconsistent compilation of extended asm.

I tried to add an error message suggesting the use of an instruction like movsx but this code is spaghetti.

maxhaton avatar May 21 '22 00:05 maxhaton

Thanks for your pull request, @maxhaton!

Bugzilla references

Auto-close Bugzilla Severity Description
19528 blocker asm ptoblem
23130 normal Inline asm lets you mov to half a variable.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "stable + dmd#14152"

dlang-bot avatar May 21 '22 00:05 dlang-bot

Stable?

thewilsonator avatar May 21 '22 00:05 thewilsonator

I can but the bug was probably misfiled.

maxhaton avatar May 21 '22 00:05 maxhaton

I can but the bug was probably misfiled.

OK, master is fine if it is easier to get green.

thewilsonator avatar May 21 '22 06:05 thewilsonator

this breaks -m32 LEA and when performed on values with size > 4. This case should be supported as mov REG, dword ptr [value], i.e get address of value.

ghost avatar May 21 '22 09:05 ghost

this breaks -m32 LEA and when performed on values with size > 4. This case should be supported as mov REG, dword ptr [value], i.e get address of value.

Let me take a look.

maxhaton avatar May 21 '22 17:05 maxhaton

@maxhaton any progress on this?

RazvanN7 avatar Jul 08 '22 08:07 RazvanN7

@maxhaton still pursuing or close?

ibuclaw avatar Jan 15 '23 15:01 ibuclaw

Still pursuing at some point although set back by the amount of work that needs doing to it overall

On Sun, 15 Jan 2023, 15:02 Iain Buclaw, @.***> wrote:

@maxhaton https://github.com/maxhaton still pursuing or close?

— Reply to this email directly, view it on GitHub https://github.com/dlang/dmd/pull/14152#issuecomment-1383173648, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLI75HRQEMZR5RS6KPTL3TWSQGQFANCNFSM5WQ76CBA . You are receiving this because you were mentioned.Message ID: @.***>

maxhaton avatar Jan 15 '23 18:01 maxhaton

@maxhaton is this still on your radar?

RazvanN7 avatar Apr 25 '23 13:04 RazvanN7