Skip to content

use AAPCS calling convention on all aeabi intrinsics#141

Merged
bors merged 3 commits into
masterfrom
aapcs
Feb 8, 2017
Merged

use AAPCS calling convention on all aeabi intrinsics#141
bors merged 3 commits into
masterfrom
aapcs

Conversation

@japaric

@japaric japaric commented Feb 7, 2017

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member

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

@japaric

japaric commented Feb 7, 2017

Copy link
Copy Markdown
Contributor Author

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

japaric commented Feb 7, 2017

Copy link
Copy Markdown
Contributor Author

@bors r=alexcrichton

@bors

bors commented Feb 7, 2017

Copy link
Copy Markdown
Contributor

📌 Commit 57085be has been approved by alexcrichton

@bors

bors commented Feb 7, 2017

Copy link
Copy Markdown
Contributor

⌛ 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

mattico commented Feb 7, 2017

Copy link
Copy Markdown
Contributor

👍

@bors

bors commented Feb 8, 2017

Copy link
Copy Markdown
Contributor

💔 Test failed - status-travis

@japaric

japaric commented Feb 8, 2017

Copy link
Copy Markdown
Contributor Author

@bors r=alexcrichton

@bors

bors commented Feb 8, 2017

Copy link
Copy Markdown
Contributor

📌 Commit 47b45d1 has been approved by alexcrichton

@bors

bors commented Feb 8, 2017

Copy link
Copy Markdown
Contributor

⌛ 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

bors commented Feb 8, 2017

Copy link
Copy Markdown
Contributor

☀️ 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