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

Error: illegal operands `andi a1,a1,4095' #1

Closed
rwmjones opened this issue Nov 10, 2016 · 8 comments

Comments

Projects
None yet
2 participants
@rwmjones
Copy link
Contributor

commented Nov 10, 2016

In the ocaml omake program, compilation fails with:

/tmp/camlasm85c0d6.s:1973: Error: illegal operands `andi a1,a1,4095'
/tmp/camlasm85c0d6.s:2031: Error: illegal operands `andi a1,a1,4095'
/tmp/camlasm85c0d6.s:2037: Error: illegal operands `andi a1,a4,4095'
/tmp/camlasm85c0d6.s:2044: Error: illegal operands `andi a1,a7,4095'
/tmp/camlasm85c0d6.s:2067: Error: illegal operands `andi a1,s2,4095'
/tmp/camlasm85c0d6.s:2074: Error: illegal operands `andi a1,s6,4095'
/tmp/camlasm85c0d6.s:2276: Error: illegal operands `andi a1,a1,4095'
/tmp/camlasm85c0d6.s:2431: Error: illegal operands `andi a1,a1,4095'
/tmp/camlasm85c0d6.s:2437: Error: illegal operands `andi a1,a4,4095'
/tmp/camlasm85c0d6.s:2444: Error: illegal operands `andi a1,a7,4095'
/tmp/camlasm85c0d6.s:2467: Error: illegal operands `andi a1,s2,4095'
/tmp/camlasm85c0d6.s:2474: Error: illegal operands `andi a1,s6,4095'
File "lm_hash.ml", line 1:
Error: Assembler error, input left in file /tmp/camlasm85c0d6.s
@rwmjones

This comment has been minimized.

Copy link
Contributor Author

commented Nov 10, 2016

This is a copy of the generated assembler:
http://oirase.annexia.org/tmp/camlasm85c0d6.s

@rwmjones

This comment has been minimized.

Copy link
Contributor Author

commented Nov 10, 2016

There's another error compiling ocaml pcre. It's very similar so I'll leave it under the same issue:

/tmp/camlasmc421b5.s: Assembler messages:
/tmp/camlasmc421b5.s:1840: Error: illegal operands `ori s2,t4,2049'
/tmp/camlasmc421b5.s:5557: Error: illegal operands `ori s6,s5,2081'
/tmp/camlasmc421b5.s:6539: Error: illegal operands `ori a1,a0,2081'
File "lib/pcre.ml", line 1:
Error: Assembler error, input left in file /tmp/camlasmc421b5.s
@nojb

This comment has been minimized.

Copy link
Owner

commented Nov 10, 2016

Thanks for the report. I think I know what is the problem. I will try to get a fix out ASAP.

@nojb

This comment has been minimized.

Copy link
Owner

commented Nov 10, 2016

I think somewhere along the way there has been a change in the range of immediate arguments for the andi, ori and xori instructions. I pushed a fix to trunk. I am running the OCaml testsuite to make sure there is no regression. If you could try it out with omake & co and report back that would be great.

@nojb

This comment has been minimized.

Copy link
Owner

commented Nov 10, 2016

Testsuite passes; I wait for your confirmation before closing this.

@rwmjones

This comment has been minimized.

Copy link
Contributor Author

commented Nov 12, 2016

I'm building everything again at the moment (status is right at the bottom of this page: https://fedorapeople.org/groups/risc-v/logs/status.html). Currently looking good, but the build has not yet reached the previously problematic packages (omake, pcre), so let's wait and see how it goes.

camlp5 is expected to fail.

@rwmjones

This comment has been minimized.

Copy link
Contributor Author

commented Nov 12, 2016

omake and pcre builds were successful with this patch.

@rwmjones rwmjones closed this Nov 12, 2016

@nojb

This comment has been minimized.

Copy link
Owner

commented Nov 12, 2016

Great, thanks!

nojb pushed a commit that referenced this issue May 15, 2018

Merge pull request #1 from Octachron/pr/1545
manual: last minute  fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.