intel / intel/generic-register-operation-optimizer

Bonus instructions

Open
#105 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
65
Forks
11
Avg merge
8h 59m
Merged PRs (30d)
4

Description

Including `groov/write.hpp` results in extra instructions.

Using arm-none-eabi-g++

```c++
// #include
#include
#include

struct concurrency_policy {
template
static inline auto call_in_critical_section(F &&f, auto &&...) -> decltype(auto) {
return std::forward(f)();
}
};

template <> inline auto conc::injected_policy<> = concurrency_policy{};

int main() {}
```

results in the assembly:

```asm
main:
mov r0, #0
bx lr
```

Adding `groov/write.hpp` (uncomment above), results some additional things coming in:

```asm
main:
mov r0, #0
bx lr
_GLOBAL__sub_I_main:
ldr r3, .L5
ldr r2, [r3]
tst r2, #1
moveq r2, #1
streq r2, [r3]
bx lr
.L5:
.word guard variable for fmt::v11::format_facet::id
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.