On 2017-10-14 23:35:22 +0300, Martin Storsjö wrote:
> ---
> I haven't been able to assemble prfum instructions with armasm64 yet;
> dumpbin -disasm does disassemble the instruction correctly (e.g. from
> an object file assembled with llvm), but armasm64 doesn't support
> assembling it, either in that form or with a few variations I've tried.
>
> In the simplest form, it fails like this:
>
> test.asm(8) : error A2502: operand 1: Expected constant
> prfum pldl1keep, [x0, #0]
>
> The prfm instruction seems to be handled correctly though. Since
> this prefetch instruction isn't essential, it can be worked around
> by simply skipping the instruction.
> ---
> gas-preprocessor.pl | 125
> +++++++++++++++++++++++++++++++++++++++++++---------
> 1 file changed, 104 insertions(+), 21 deletions(-)
>
> diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
> index 9bcdbac..a8cf1e0 100755
> --- a/gas-preprocessor.pl
> +++ b/gas-preprocessor.pl
...
> @@ -1013,11 +1091,16 @@ sub handle_serialized_line {
> $line =~ s/\.text/AREA |.text|, CODE, READONLY, ALIGN=4, CODEALIGN/;
> $line =~ s/(\s*)(.*)\.rodata/$1AREA |.rodata|, DATA, READONLY,
> ALIGN=5/;
> $line =~ s/\.data/AREA |.data|, DATA, ALIGN=5/;
> -
> + }
> + if ($as_type eq "armasm" and $arch eq "arm") {
> $line =~ s/fmxr/vmsr/;
> $line =~ s/fmrx/vmrs/;
> $line =~ s/fadds/vadd.f32/;
> }
> + if ($as_type eq "armasm" and $arch eq "aarch64") {
> + # Convert "b.eq" into "beq"
> + $line =~ s/\bb\.($arm_cond_codes)\b/b\1/;
> + }
wtf!
>
> # catch unknown section names that aren't mach-o style (with a comma)
> if ($as_type =~ /apple-/ and $line =~ /.section ([^,]*)$/) {
> @@ -1038,7 +1121,7 @@ if ($as_type ne "armasm") {
> grep exists $thumb_labels{$_}, keys %call_targets;
> } else {
> map print(ASMFILE "\tIMPORT $_\n"),
> - grep ! exists $labels_seen{$_}, (keys %call_targets, keys
> %mov32_targets);
> + grep ! exists $labels_seen{$_}, (keys %call_targets, keys
> %import_symbols);
>
> print ASMFILE "\tEND\n";
> }
patch ok
Janne
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel