Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed clang as assembly #162

Closed
wants to merge 2 commits into from
Closed

Conversation

cielavenir
Copy link
Contributor

Thanks to recent clang as update, it is possible to assemble isa-l with least modification.
I have tested compression/decompression using Android NDK r21b (NDK r20c is old and does not work)

Maybe we could work on #107 again.

Signed-off-by: Taiju Yamada [email protected]

Signed-off-by: Taiju Yamada <[email protected]>
@gbtucker
Copy link
Contributor

Thanks @cielavenir, so these are the only changes necessary to build on android/clang? If so can someone test on linux/clang?

Was the sign extend to 64bit originally intended or promoted automatically before with GAS? Do you know why this was a tools issue?

@cielavenir
Copy link
Contributor Author

cielavenir commented Nov 25, 2020

gen_icf_map:

GAS assembled into sub x1, x4, w15, uxtw so my previous code (x1,x4,x15,uxtx) was wrong. I fixed it so that GAS (with/without my patch) and clang-as (with my patch) writes the same machine-code.

igzip_decode_huffman:

GAS (with/without my patch) and clang-as assembled into mov w4,w4 (already the same).

@cielavenir
Copy link
Contributor Author

by the way the original errors were:

gen_icf_map:

igzip/aarch64/gen_icf_map.S:234:31: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
 sub x_tmp1, next_in, x_dist, uxtw

igzip_decode_huffman:

<instantiation>:9:7: error: invalid operand for instruction
 uxtw read_in_length,read_in_length

@cielavenir
Copy link
Contributor Author

For the "linux testing", clang needs to be at least rL360381 according to https://reviews.llvm.org/D61719 .

@yuhaoth
Copy link
Contributor

yuhaoth commented Dec 4, 2020

Thanks @cielavenir . Just read this patch . It looks good for me .
I will setup internal CI test for clang and post the result here.

Do you know the release version of rL360381 ? I want to update the document about arm64 build

@cielavenir
Copy link
Contributor Author

@cielavenir
Copy link
Contributor Author

#164 includes this PR content. So please merge this only if #164 takes quite long.

@yuhaoth
Copy link
Contributor

yuhaoth commented Dec 7, 2020

@yuhaoth yuhaoth mentioned this pull request Dec 8, 2020
@yuhaoth
Copy link
Contributor

yuhaoth commented Dec 8, 2020

I re-org this patch into #168 .
@cielavenir I need your approve to merge #168

@cielavenir
Copy link
Contributor Author

moved to #168

@cielavenir cielavenir closed this Dec 9, 2020
@cielavenir cielavenir deleted the fix_clang_as branch March 15, 2022 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants