Add SynHighlighterAsmX86_64 (x86-64 assembler with AVX support) - #7
Open
TetzkatLipHoka wants to merge 5 commits into
Open
Add SynHighlighterAsmX86_64 (x86-64 assembler with AVX support)#7TetzkatLipHoka wants to merge 5 commits into
TetzkatLipHoka wants to merge 5 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
SynHighlighterAsmX86_64, a highlighter for x86-64 assembler withseparate 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
SynHighlighterAsmistoo coarse.
Registered in
SynEditRegand added to the runtime package of everysupported IDE version.
Stacked on #1
This branch sits on top of
delphi-10.x-support, so the diff currently showsthat 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.dpkbuilt for 13.0(Delphi 13.1) and for 10.0 (Delphi 10 Seattle).
🤖 Generated with Claude Code