Skip to content

Commit 078429a

Browse files
authored
Merge pull request #321 from yui-915/aarch64-host-fix
Fix compilation on linux-aarch64 hosts
2 parents 5d23941 + 9f4aedb commit 078429a

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@ on: [push, pull_request]
55
# May require a special support for build-only mode in btest
66

77
jobs:
8+
ubuntu-aarch64-host:
9+
runs-on: ubuntu-24.04-arm
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
- name: Install Rust
14+
run: rustup toolchain install stable --no-self-update --profile minimal
15+
- name: Install Dependencies
16+
run: |
17+
sudo apt-get update
18+
sudo apt-get install -qq -y clang make
19+
- name: Build Toolchain
20+
run: |
21+
make -B
22+
- name: Run Tests
23+
run: |
24+
./build/btest -t gas-aarch64-linux
825
ubuntu-linux-windows:
926
runs-on: ubuntu-latest
1027
steps:

src/codegen/mos6502.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -505,10 +505,10 @@ pub unsafe fn parse_addr_or_label(line_begin: *const c_char, mut line: *const c_
505505
asm: *mut Assembler) -> (Address, *const c_char) {
506506
while isspace(*line as i32) != 0 {line = line.add(1);}
507507

508-
let (v, mut end) = match *line as u8 {
509-
c if is_identifier_start(c as i8) => {
508+
let (v, mut end) = match *line {
509+
c if is_identifier_start(c) => {
510510
let start = line;
511-
while is_identifier(*line as i8) {line = line.add(1);}
511+
while is_identifier(*line) {line = line.add(1);}
512512
let len = line as isize - start as isize;
513513

514514
let label = arena::sprintf(&mut (*asm).string_arena, c!("%.*s"), len, start);
@@ -557,7 +557,7 @@ pub unsafe fn assemble_statement(out: *mut String_Builder,
557557
}
558558

559559
for i in 0..len {
560-
*name.add(i) = toupper(*name.add(i) as i32) as i8;
560+
*name.add(i) = toupper(*name.add(i) as i32) as c_char;
561561
}
562562
let instr = match instr_from_string(name) {
563563
Some(v) => v,

0 commit comments

Comments
 (0)