Skip to content

Add SynHighlighterAsmX86_64 (x86-64 assembler with AVX support) - #7

Open
TetzkatLipHoka wants to merge 5 commits into
VSoftTechnologies:masterfrom
TetzkatLipHoka:feature/asm-x86-64
Open

Add SynHighlighterAsmX86_64 (x86-64 assembler with AVX support)#7
TetzkatLipHoka wants to merge 5 commits into
VSoftTechnologies:masterfrom
TetzkatLipHoka:feature/asm-x86-64

Conversation

@TetzkatLipHoka

Copy link
Copy Markdown

Adds SynHighlighterAsmX86_64, a highlighter for x86-64 assembler with
separate attribute classes for registers, float/vector registers, jumps,
conditional instructions, AVX instructions, type sizes, labels and
hex/octal/float/char literals. It is aimed at Keystone/Capstone/iced based
assembler and disassembler views, where the existing SynHighlighterAsm is
too coarse.

Registered in SynEditReg and added to the runtime package of every
supported IDE version.

Stacked on #1

This branch sits on top of delphi-10.x-support, so the diff currently shows
that PR's commits as well — the highlighter itself is the last commit. Once
#1 is merged this reduces to a single commit. Happy to rebase it onto master
instead if you prefer to look at them the other way round.

Verified builds

Built with 13.1 for Win32 and Win64, and SynEditDR.dpk built for 13.0
(Delphi 13.1) and for 10.0 (Delphi 10 Seattle).


🤖 Generated with Claude Code

TetzkatLipHoka and others added 5 commits July 21, 2026 19:10
Re-adds SynHighlighterAsmMASM, SynHighlighterECMAScript, SynHighlighterGLSL,
SynHighlighterGo, SynHighlighterZPL and the SynHighlighterHashEntries helper
unit (taken from the pre-removal state of the code base), including their
SynEditStrConst constants, designtime registration and package entries.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
All changes are guarded with {$IF CompilerVersion >= NN} so that 10.4+
compiles exactly as before:

- 10.3: Screen.DefaultPixelsPerInch -> USER_DEFAULT_SCREEN_DPI,
  TControl.ClientToScreen(TRect) and per-control StyleServices(Self)
- 10.2: replaced inline variable declarations with classic var blocks,
  guarded the DPI overloads of DrawElement, GetCurrentPPI override and
  GetSystemMetricsForDPI
- 10.1: TThread.ForceQueue falls back to TThread.Queue,
  SynHighlighterManager uses the CurrentPPI helper from SynEditTypes
- 10 Seattle: TStrings.Options/Updating/TrailingLineBreak fallbacks,
  ChangeScale without isDpiChange, explicit TRect->TRectF conversions,
  IDWriteLocalizedStrings.FindLocaleName header difference, guarded
  TStringList.UseLocale, Char helper workaround on indexed PWideChar,
  TParallel.For overload resolution via typed local closure

Adds package folders for RAD Studio 10.0-10.3 (dpk with fixed LIBSUFFIX;
the IDE generates the dproj when opening the dpk).

Verified: DR+DD build with dcc32 on 10.0/10.1/10.2/10.3/10.4/11.3/12.3/13.1
and with dcc64 on 13.1.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The list declared Get/Put/Items with an Integer index. TList.Items is
declared Items[Index: NativeInt] since Delphi 12, so on Win64 the
redeclaration no longer fully hides the inherited property: a Cardinal
argument - which the Asm highlighters pass as their hash value - binds to
TList.Items, because Cardinal -> NativeInt is lossless while
Cardinal -> Integer is not. The inherited setter does not grow the list, so
the very first keyword raises "EListError: List index out of bounds (52)".
Win32 is unaffected, both signatures are identical there.

The index type is switched conditionally: an unconditional NativeInt is
itself ambiguous on 11.3 and older (E2251).
Same entry as in the newer packages: the unit sits in Source but was not
listed anywhere, so it was never built or registered.
Rich x86-64 assembler highlighter with separate attribute classes for
registers, float/vector registers, jumps, conditional instructions, AVX
instructions, type sizes, labels and hex/octal/float/char literals.
Suitable for Keystone/Capstone/iced based assembler and disassembler views.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant