Add __CYCLES__ variable to count cycles used by instructions (#2171)

This commit is contained in:
Rangi authored and GitHub committed 2026-09-27 19:59:32 -04:00
1 parent 6e2e2f1db7
commit 62a9d8d518
7 files changed
+192

No files matched your search

+1
View File
@@ -40,6 +40,7 @@ struct Section {
uint16_t alignOfs;
std::deque<Patch> patches;
std::vector<uint8_t> data;
uint32_t cyclesCounter; // `__CYCLES__` value; unsigned for well-defined overflow on increment
SectionTypeInfo const &typeInfo() const { return sectionTypeInfo[type]; }
+1
View File
@@ -83,6 +83,7 @@ Symbol *sym_RedefEqu(InternedStr symName, int32_t value);
Symbol *sym_AddVar(InternedStr symName, int32_t value);
int32_t sym_GetRSValue();
void sym_SetRSValue(int32_t value);
void sym_IncrementCYCLESValue(uint32_t delta);
// Find a symbol by exact name, bypassing expansion checks
Symbol *sym_FindExactSymbol(InternedStr symName);
// Find a symbol, possibly scoped, by name