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

use AAPCS calling convention on all aeabi intrinsics #141

Merged
merged 3 commits into from
Feb 8, 2017
Merged

use AAPCS calling convention on all aeabi intrinsics #141

merged 3 commits into from
Feb 8, 2017

Conversation

japaric
Copy link
Member

@japaric japaric commented Feb 7, 2017

also, on ARM, inline(always) the actual implementation of the intrinsics so we
end with code like this:

00000000 <__aeabi_dadd>:
    (implementation here)

instead of "trampolines" like this:

00000000 <__aeabi_dadd>:
    (shuffle registers)
    (call __adddf3)

00000000 <__adddf3>:
    (implementation here)

closes #116

cc #66
r? @alexcrichton
cc @mattico

also, on ARM, inline(always) the actual implementation of the intrinsics so we
end with code like this:

```
00000000 <__aeabi_dadd>:
    (implementation here)
```

instead of "trampolines" like this:

```
00000000 <__aeabi_dadd>:
    (shuffle registers)
    (call __adddf3)

00000000 <__adddf3>:
    (implementation here)
```

closes #116
@alexcrichton
Copy link
Member

r=me, but looks like arm tests are failing?

@japaric
Copy link
Member Author

japaric commented Feb 7, 2017

Yes, looking into it. Seems that there no aeabi intrinsics for i128 operations so LLVM is lowering those to the "x86 named" ones on ARM.

- multi3: there's no aeabi equivalent
- divmod{s,d}i4: these are directly called by __aeabi_{l,i}divmod
- add{s,d}f3: required by the C sub{s,d}f3 implementation

but make sure they also use the AAPCS calling convention
@japaric
Copy link
Member Author

japaric commented Feb 7, 2017

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Feb 7, 2017

📌 Commit 57085be has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Feb 7, 2017

⌛ Testing commit 57085be with merge 8ad1f99...

bors added a commit that referenced this pull request Feb 7, 2017
use AAPCS calling convention on all aeabi intrinsics

also, on ARM, inline(always) the actual implementation of the intrinsics so we
end with code like this:

```
00000000 <__aeabi_dadd>:
    (implementation here)
```

instead of "trampolines" like this:

```
00000000 <__aeabi_dadd>:
    (shuffle registers)
    (call __adddf3)

00000000 <__adddf3>:
    (implementation here)
```

closes #116

cc #66
r? @alexcrichton
cc @mattico
@mattico
Copy link
Contributor

mattico commented Feb 7, 2017

👍

@bors
Copy link
Contributor

bors commented Feb 8, 2017

💔 Test failed - status-travis

@japaric
Copy link
Member Author

japaric commented Feb 8, 2017

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Feb 8, 2017

📌 Commit 47b45d1 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Feb 8, 2017

⌛ Testing commit 47b45d1 with merge 9aa3a25...

bors added a commit that referenced this pull request Feb 8, 2017
use AAPCS calling convention on all aeabi intrinsics

also, on ARM, inline(always) the actual implementation of the intrinsics so we
end with code like this:

```
00000000 <__aeabi_dadd>:
    (implementation here)
```

instead of "trampolines" like this:

```
00000000 <__aeabi_dadd>:
    (shuffle registers)
    (call __adddf3)

00000000 <__adddf3>:
    (implementation here)
```

closes #116

cc #66
r? @alexcrichton
cc @mattico
@bors
Copy link
Contributor

bors commented Feb 8, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 9aa3a25 to master...

@bors bors merged commit 47b45d1 into master Feb 8, 2017
@japaric japaric mentioned this pull request Feb 8, 2017
8 tasks
@japaric japaric deleted the aapcs branch March 6, 2017 20:20
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.

__aeabi_ functions should use the AAPCS calling convention, at least with LLVM 4.0+
4 participants