AsmTypePrefix:
near ptr
far ptr
byte ptr
short ptr
int ptr
word ptr
dword ptr
qword ptr
float ptr
double ptr
real ptr
std.math contains the following line of code:
jge short L_largepositive;
This is not valid according to the documentation on http://dlang.org/iasm.html because it states that the identifier "ptr" is required after "short".
Comment #1 by blah38621 — 2014-08-17T00:05:14Z
I believe this was intended to be an alias for near ptr, not short ptr. Although there may be another pointer size possible that I'm not currently thinking of.
Comment #2 by blah38621 — 2014-08-17T00:08:49Z
A small snippet from the ASM parsing in Mono-D:
case "near":
case "far":
case "byte":
case "short":
case "int":
case "word":
case "dword":
case "qword":
case "float":
case "double":
case "real":
// TODO: Put this information in the AST
Step();
if (laKind == Identifier && la.Value == "ptr")
Step();
else if (t.Value != "short")
SynErr(Identifier, "Expected ptr!");
else if (!(Parent is AsmStatement.InstructionStatement) || !((AsmStatement.InstructionStatement)Parent).IsJmpFamily)
SynErr(Identifier, "A short reference is only valid for the jmp family of instructions!");
return ParseAsmExpression(Scope, Parent);
Comment #3 by robert.schadek — 2024-12-15T15:22:36Z