flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2, 3 ... 30, 31, 32 |
Author |
|
revolution
It's a bug. Thanks for reporting.
There are some other bugs and updates that fasmarm is due for. They ill be fixed soon hopefully. |
|||
![]() |
|
MazeGen
Are there any instructions how to build FASMARM? I can tell how to combine FASMARM sources with FASM thanks to ProMiNick's fasmpack, however, what about the compatibility? Is v1.43 compatible with the latest FASM version? I read the ReadMe but didn't find this information.
EDIT: just found this post from 2017: revolution wrote:
|
|||
![]() |
|
revolution
Because of the way the patching works, you need the matching version of fasm.
The most recent build uses 1.72.02 https://board.flatassembler.net/topic.php?p=201689#201689 From there just copy the files from fasmarm into the same folders as fasm. All the files are separate so it doesn't overwrite any files. Then change into the fasmarm folder and use fasm to compile fasmarm/fasmwarm. |
|||
![]() |
|
TmEE
I'm finally starting to get back into ARM development again and I see there's been no fixes since last time I was here.
I took a look at the source code and I couldn't really see where I should dig into to fix the problem I originally described. Where should I look to make an attempt to fix it myself ? |
|||
![]() |
|
zhak
flat assembler for ARM version 1.43 (built on fasm 1.73.02)
There seems to be something wrong with ADRP instruction. Code: processor cpu64_v8 code64 mrs x9, mpidr_el1 tst x9, 11b b.eq __init wfe b.al $ - 4 __init: adr x9, $$ mov sp, x9 adrp x9, bss add x9, x9, bss and 0xfff mov x8, bss_size / 16 stp xzr, xzr, [x9], 16 subs x8, x8, 1 b.gt $ - 8 b.al $ align 16 bss: align 16 bss_size = $ - bss fails with error: Code: adrp x9, bss processed: adrp x9,bss error: Address is not aligned. However, changing "ADRP x9, bss" to "dw 0x90000009" compiles and correctly disassembles into ADRP x9, 0x0 |
|||
![]() |
|
revolution
Thank you for the report. I will add it to the list of things to fix when I am back to my desk.
The problem appears to be with adrp trying to use labels defined later in the source. Also: Note that your bss_size is zero. |
|||
![]() |
|
revolution
You can apply a temporary fix around line 24774 in armv8.asm:
Code: ;... ARM64_adr: ;used by ADR, ADRP call decode_template TEMPLATE \ <TMPL_dword_z_reg,TMPL_address64> ;0=xd,imm test [cpu_capability_flags2],1 shl CPU64_CAPABILITY_V8 shr 32 jz ERROR_requires_cpu64_capability_v8 mov ebp,[arm64_instruction] mov eax,[immediate_value] mov edx,[immediate_value_high] mov ecx,[addressing_space] add eax,[ecx+0] adc edx,[ecx+4] sub eax,edi sbb edx,0 test ebp,ebp ;ADRP? jns .offset_okay test eax,0xfff mov ecx,ERROR_branch_misaligned ; jnz ARM_store_instruction_with_error ; <--- comment out this line shrd eax,edx,12 sar edx,12 .offset_okay: ;... |
|||
![]() |
|
zhak
Thanks for the workaround, revolution. Source doesn't compile with the latest fasm, but I found 1.73.04 build somewhere on the internet and it worked fine.
|
|||
![]() |
|
revolution
I see that the download page has only version 1.73.05 and up now.
http://flatassembler.net/fasmw17305.zip http://flatassembler.net/fasm-1.73.05.tgz http://flatassembler.net/fasm17305.zip http://flatassembler.net/fasm-1.73.05.tar.gz I don't know if that version will work though. |
|||
![]() |
|
ProMiNick
revolution, somewhere on the internet - I guess it is some of mines (fasmpack, at home I get fasmwarm 1.43 build on 1.73.27, (in net on 1.73.25 - core has no significant changes for ARM from 1.73.27)) adaptations (last patch thou introduced wasn`t there).
Thou still can`t return to home? |
|||
![]() |
|
Tomasz Grysztar
revolution wrote: I see that the download page has only version 1.73.05 and up now. |
|||
![]() |
|
Goto page Previous 1, 2, 3 ... 30, 31, 32 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.