[RISC-V] Update streamer ArchString in emitTargetFeaturePush() (#225133)
Previously, RISCVAsmPrinter::emitTargetFeaturePush() only emitted `.option push`
and `.option arch` without updating the streamer's active ArchString. When
emitting an ELF object file directly (`-filetype=obj`),
RISCVTargetELFStreamer::emitDirectiveOptionArch() is a no-op while
emitTargetFeaturePop() resets ArchString back to the pushed ArchString, so
module-level inline assembly and functions with custom `target-features` failed
to emit updated `$x<arch>` mapping symbols.
Call RTS.setArchString() with the parsed ISA string in emitTargetFeaturePush()
so `-filetype=obj` records the active `$x<arch>` mapping symbol alongside
`.option arch`.
This commit was created with the help of AI tools
Pull-Request: https://github.com/llvm/llvm-project/pull/225133
[RISC-V][MC] Update ELF streamer ArchString in setFlagsFromFeatures() (#225140)
During LTO, the TargetMachine subtarget is initialized with the linker's
default CPU (e.g. `generic-rv64`, `rv64i2p1`), while
RISCVAsmPrinter::emitStartOfAsmFile() reconstructs the module's actual ISA from
the `riscv-isa` module flag and calls RISCVTargetStreamer::setFlagsFromFeatures()
and RISCVTargetStreamer::emitTargetAttributes(). Because
RISCVTargetELFStreamer previously only initialized InitialArchString and
ArchString in its constructor rather than in setFlagsFromFeatures(), direct
object emission bypassed the update and tagged `.text` with `$xrv64i2p1`
instead of the module's full architecture string.
Move the InitialArchString and ArchString initialization into
RISCVTargetELFStreamer::setFlagsFromFeatures() and also call setArchString()
alongside emitTextAttribute(RISCVAttrs::ARCH, ...) in
RISCVTargetStreamer::emitTargetAttributes().
This commit was created with the help of AI tools
Pull-Request: https://github.com/llvm/llvm-project/pull/225140
[RISC-V][MC] Fix mapping symbol section tracking on popSection() (#225131)
Previously, RISCVELFStreamer::changeSection() saved LastEMS and LastEmittedArch
under getPreviousSection().first instead of getCurrentSection().first. When
MCStreamer::popSection() switches back to a previous section,
getPreviousSection() already points to the destination section being restored
rather than the section being exited. This clobbered the destination section's
saved mapping symbol state and caused duplicate `$x<arch>` mapping symbols to
be emitted whenever returning to `.text`.
Use getCurrentSection().first instead, matching AArch64ELFStreamer and
ARMELFStreamer.
This commit was created with the help of AI tools
Pull-Request: https://github.com/llvm/llvm-project/pull/225131
[LTO] Preserve module inline asm target properties for .lto_discard and symvers (#225130)
Previously, LTO::addRegularLTO() and IRLinker::run() called
prependModuleInlineAsm() and appendModuleInlineAsm() with a plain string when
synthesizing `.lto_discard` and imported `.symver` directives, creating a new
GlobalAsmFragment with empty TargetCPU and TargetFeatures instead of preserving
the existing module inline asm's properties. Copy the front fragment's Props so
these synthesized directives are merged into the module's inline asm with the
same target features.
This commit was created with the help of AI tools
Pull-Request: https://github.com/llvm/llvm-project/pull/225130
[RISC-V][LTO] Add baseline tests for LTO inline assembly and mapping symbols (#225129)
No functional change intended here, just adding test coverage for RISC-V LTO
inline assembly ABI handling (following up on
https://github.com/llvm/llvm-project/pull/223606) and for the `$x<arch>` ELF
mapping symbols emitted for module and function target features.
The `TODO`s for `.lto_discard` dropping module inline asm target features and
for the missing/duplicate `$x<arch>` mapping symbols will be addressed in the
following commits.
This commit was created with the help of AI tools
Pull-Request: https://github.com/llvm/llvm-project/pull/225129
Do not trust the upgrade type when the repository cannot be read
Review of #74 found three places where the check acted on an answer it
had no reason to trust.
pkg update -f failing went unnoticed, and the package list was then read
from a stale catalogue. update_repository() reports it now,
check_for_update() and find_updates() answer None for "unknown", and
SomethingIsWrong, the dialog already written for that case and until now
unreachable, is shown instead of a package list. The tray stays hidden.
A major upgrade whose repository version cannot be read is refused,
because the boot environment is named after that version and cannot be
created without one. An empty version stays acceptable everywhere else.
pkg rquery exits non-zero both when it fails and when the repository has
no such package, so refusing it outright would leave a system whose
repository serves no GhostBSD-runtime unable to install any package
update.
[4 lines not shown]
x11/ghostbsd-mate-settings: Update to 26.09.0
Adds GhostBSD's default for Mocka Dock's pinned apps, with Software Station after the dock's own defaults.
sysutils/gtime: new port
GNU time runs another program, then displays information about the
resources used by that program.
Co-authored-by: Michael Osipov <michaelo at FreeBSD.org>
PR: 297851
sysutils/gtime: new port
GNU time runs another program, then displays information about the
resources used by that program.
Co-authored-by: Michael Osipov <michaelo at FreeBSD.org>
PR: 297851
x11/mocka-dock: New port: taskbar-style dock applet for the MATE panel
Mocka Dock shows pinned and running applications as one row of buttons
on the MATE panel, with one button per application and an
application-focused right-click menu. It is part of the Mocka desktop
for GhostBSD.
0.0.1 is the first alpha for GhostBSD testers.
WWW: https://github.com/mocka-desktop/mocka-dock
[M68k] Finish implementation of `MOVX` (move and extend) pseudo-instructions and fix related errors (#218938)
This patch adds remaining addressing modes to the "move and extend"
pseudo-instructions, and fixes a few errors and inconsistencies in the
logic that caused inefficient code generation.
- Remaining addressing modes were implemented to match non-pseudo `MOVE`
instructions.
- Names of the pseudos now correctly reflect the register classes they
operate on, e.g. `MOVZXd32r16` for XR16 -> DR32.
- Fixed an issue where `MOVZX` could be allocated to an address
register, which has no way to zero-extend the result. (There were even
some of these in the test `register-spills.ll`, emitted as illegal
instructions, but the test doesn't have instruction verification
enabled, so it wasn't caught.)
- Fixed some `extload` patterns where the register was unnecessarily
extended to 32 bits before being truncated to its final size, causing
redundant instructions to be omitted.
- Fixed `anyext` patterns lowering to `MOVZX` instead of `MOVX`, causing
[5 lines not shown]
devel/py-tyro: new port
tyro is a lightweight, ergonomic way to build CLI interfaces and
config objects directly from Python type annotations. It wraps
argparse with a clean, type-driven API and sensible defaults,
letting you turn dataclasses, attrs classes, or Pydantic models
into CLI interfaces.
It provides automatic --help generation from docstrings, shell
completion for bash/zsh/fish/PowerShell, and nested subcommands
with minimal boilerplate.
Signed-off-by: Pedro Ramos <pr9000 at tutamail.com>
Co-authored-by: Michael Osipov <michaelo at FreeBSD.org>
PR: 297523