Skip to content

Commit b11a355

Browse files
authored
Merge pull request #938 from cppalliance/local_metal_benching
2 parents 1e011c2 + cbffcea commit b11a355

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

.github/workflows/metal.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ------------------------------------------------------------------------------
2-
# Copyright Matt Borland 2023 - 2024.
3-
# Copyright Christopher Kormanyos 2023 - 2024.
2+
# Copyright Matt Borland 2023 - 2025.
3+
# Copyright Christopher Kormanyos 2023 - 2025.
44
# Distributed under the Boost Software License,
55
# Version 1.0. (See accompanying file LICENSE_1_0.txt
66
# or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -33,20 +33,20 @@ jobs:
3333
wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libncursesw5_6.3-2ubuntu0.1_amd64.deb
3434
sudo apt install ./libncursesw5_6.3-2ubuntu0.1_amd64.deb
3535
mkdir -p emu_env && cd emu_env
36-
wget --no-check-certificate https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz
37-
tar -xf arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz
36+
wget --no-check-certificate https://developer.arm.com/-/media/Files/downloads/gnu/14.3.rel1/binrel/arm-gnu-toolchain-14.3.rel1-x86_64-arm-none-eabi.tar.xz
37+
tar -xf arm-gnu-toolchain-14.3.rel1-x86_64-arm-none-eabi.tar.xz
3838
wget --no-check-certificate https://github.com/xpack-dev-tools/qemu-arm-xpack/releases/download/v8.2.6-1/xpack-qemu-arm-8.2.6-1-linux-x64.tar.gz
3939
tar -xzf xpack-qemu-arm-8.2.6-1-linux-x64.tar.gz
4040
working-directory: ./test/metal/
4141
- name: build benchmark_single-stm32f429
4242
run: |
43-
PATH="${{ runner.workspace }}/decimal/test/metal/emu_env/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi/bin:$PATH"
43+
PATH="${{ runner.workspace }}/decimal/test/metal/emu_env/arm-gnu-toolchain-14.3.rel1-x86_64-arm-none-eabi/bin:$PATH"
4444
echo 'Query arm-none-eabi-g++ version'
4545
echo
4646
arm-none-eabi-g++ -v
4747
echo
4848
mkdir -p bin
49-
arm-none-eabi-g++ -std=c++20 -Wall -Wextra -Wpedantic -Os -g -gdwarf-2 -ffunction-sections -fdata-sections -x c++ -fno-rtti -fno-use-cxa-atexit -fno-exceptions -fno-nonansi-builtins -fno-threadsafe-statics -fno-enforce-eh-specs -fno-inline-functions -mcpu=cortex-m4 -mtune=cortex-m4 -mthumb -mfloat-abi=soft -mno-unaligned-access -mno-long-calls -I../../include -DBOOST_DECIMAL_DISABLE_CLIB -DAPP_BENCHMARK_STANDALONE_MAIN app_benchmark_non_std_decimal.cpp ./target/micros/stm32f429/make/single/crt.cpp ./target/micros/stm32f429/make/single/mcal_gcc_cxx_completion_with_stdlib.cpp -nostartfiles -Wl,--gc-sections -Wl,-Map,./bin/app_benchmark_non_std_decimal.map -T ./target/micros/stm32f429/make/stm32f429.ld --specs=nano.specs --specs=nosys.specs -Wl,--print-memory-usage -o ./bin/app_benchmark_non_std_decimal.elf
49+
arm-none-eabi-g++ -std=c++23 -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wunused-parameter -Wuninitialized -Wshadow -Os -g -gdwarf-2 -ffunction-sections -fdata-sections -x c++ -fno-rtti -fno-use-cxa-atexit -fno-exceptions -fno-nonansi-builtins -fno-threadsafe-statics -fno-enforce-eh-specs -fno-inline-functions -mcpu=cortex-m4 -mtune=cortex-m4 -mthumb -mfloat-abi=soft -mno-unaligned-access -mno-long-calls -I../../include -DBOOST_DECIMAL_DISABLE_CLIB -DAPP_BENCHMARK_STANDALONE_MAIN app_benchmark_non_std_decimal.cpp ./target/micros/stm32f429/make/single/crt.cpp ./target/micros/stm32f429/make/single/mcal_gcc_cxx_completion_with_stdlib.cpp -nostartfiles -Wl,--gc-sections -Wl,-Map,./bin/app_benchmark_non_std_decimal.map -T ./target/micros/stm32f429/make/stm32f429.ld --specs=nano.specs --specs=nosys.specs -Wl,--print-memory-usage -o ./bin/app_benchmark_non_std_decimal.elf
5050
arm-none-eabi-objcopy ./bin/app_benchmark_non_std_decimal.elf -O ihex ./bin/app_benchmark_non_std_decimal.hex
5151
ls -la ./bin/app_benchmark_non_std_decimal.elf ./bin/app_benchmark_non_std_decimal.hex ./bin/app_benchmark_non_std_decimal.map
5252
working-directory: ./test/metal/
@@ -59,7 +59,7 @@ jobs:
5959
- name: run-test-on-target
6060
run: |
6161
sleep 2
62-
PATH="${{ runner.workspace }}/decimal/test/metal/emu_env/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi/bin:$PATH"
62+
PATH="${{ runner.workspace }}/decimal/test/metal/emu_env/arm-gnu-toolchain-14.3.rel1-x86_64-arm-none-eabi/bin:$PATH"
6363
echo 'Run test on target'
6464
echo
6565
arm-none-eabi-gdb ./bin/app_benchmark_non_std_decimal.elf -x ./target/build/test_app_benchmarks_emulator.gdb > ./app_benchmark_non_std_decimal.txt

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
| Github Actions | [![CI](https://github.com/cppalliance/decimal/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/cppalliance/decimal/actions/workflows/ci.yml) | [![CI](https://github.com/cppalliance/decimal/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/cppalliance/decimal/actions/workflows/ci.yml)
77
| Codecov | [![codecov](https://codecov.io/gh/cppalliance/decimal/branch/master/graph/badge.svg?token=drvY8nnV5S)](https://codecov.io/gh/cppalliance/decimal) | [![codecov](https://codecov.io/gh/cppalliance/decimal/graph/badge.svg?token=drvY8nnV5S)](https://codecov.io/gh/cppalliance/decimal) |
88
| Fuzzing | [![Fuzzing](https://github.com/cppalliance/decimal/actions/workflows/fuzz.yml/badge.svg?branch=master)](https://github.com/cppalliance/decimal/actions/workflows/fuzz.yml) | [![Fuzzing](https://github.com/cppalliance/decimal/actions/workflows/fuzz.yml/badge.svg?branch=develop)](https://github.com/cppalliance/decimal/actions/workflows/fuzz.yml) |
9+
| Metal | [![Metal](https://github.com/cppalliance/decimal/actions/workflows/metal.yml/badge.svg?branch=master)](https://github.com/cppalliance/decimal/actions/workflows/metal.yml) | [![Metal](https://github.com/cppalliance/decimal/actions/workflows/metal.yml/badge.svg?branch=develop)](https://github.com/cppalliance/decimal/actions/workflows/metal.yml) |
910

1011
---
1112

@@ -51,12 +52,12 @@ conan create decimal/conan --build missing
5152

5253
# Supported Platforms
5354

54-
Boost.Decimal is tested natively on Ubuntu (x86_64, s390x, and aarch64), macOS (x86_64, and Apple Silicon), and Windows (x32 and x64);
55-
as well as emulated PPC64LE and STM32 using QEMU with the following compilers:
55+
Boost.Decimal is tested natively on Ubuntu (x86_64, s390x, and aarch64), macOS (x86_64, and Apple Silicon),
56+
and Windows (x32 and x64); as well as emulated PPC64LE and ARM Cortex-M using QEMU with the following compilers:
5657

5758
* GCC 7 and later
5859
* Clang 6 and later
59-
* Visual Studio 2017 and later
60+
* Visual Studio 2019 and later
6061
* Intel OneAPI DPC++
6162

6263
# Synopsis
@@ -122,7 +123,7 @@ int main()
122123
```
123124

124125
This intuitive straightforwardness is the same when using Standard-Library
125-
functions (such as STL functions, `<cmath>`-like functions and the like).
126+
functions (such as STL functions, `<cmath>` functions and the like).
126127

127128
```cpp
128129
#include <boost/decimal.hpp>

include/boost/decimal/decimal32_fast.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ constexpr auto direct_init(const detail::decimal_fast32_t_components& x) noexcep
466466
{
467467
decimal_fast32_t val;
468468
val.significand_ = x.sig;
469-
val.exponent_ = static_cast<std::uint_fast8_t>(static_cast<int>(x.exp) + detail::bias_v<decimal_fast32_t>);
469+
val.exponent_ = static_cast<typename decimal_fast32_t::exponent_type>(static_cast<int>(x.exp) + detail::bias_v<decimal_fast32_t>);
470470
val.sign_ = x.sign;
471471

472472
return val;

0 commit comments

Comments
 (0)