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

Remove GOOGLE_PROTOBUF_ARCH_PPC #20

Merged
merged 1 commit into from Sep 18, 2014
Merged

Remove GOOGLE_PROTOBUF_ARCH_PPC #20

merged 1 commit into from Sep 18, 2014

Conversation

edmonds
Copy link
Contributor

@edmonds edmonds commented Sep 13, 2014

The macro GOOGLE_PROTOBUF_ARCH_PPC is not used anywhere in the protobuf
source; there is no Power-specific atomics implementation, etc.

Funnily enough, the macro ppc is not actually defined on 32-bit
Power on GCC/Linux, according to the following webpage:

http://nadeausoftware.com/articles/2012/02/c_c_tip_how_detect_processor_type_using_compiler_predefined_macros#POWER

and verified on a 32-bit Debian sid 'powerpc' chroot:

(sid_powerpc-dchroot)edmonds@partch:~$ gcc -dM -E - < /dev/null | grep -c __ppc__
0
(sid_powerpc-dchroot)edmonds@partch:~$ gcc -dM -E - < /dev/null | grep -c __LP64__
0

The macro GOOGLE_PROTOBUF_ARCH_PPC is not used anywhere in the protobuf
source; there is no Power-specific atomics implementation, etc.

Funnily enough, the macro __ppc__ is not actually defined on 32-bit
Power on GCC/Linux, according to the following webpage:

    http://nadeausoftware.com/articles/2012/02/c_c_tip_how_detect_processor_type_using_compiler_predefined_macros#POWER

and verified on a 32-bit Debian sid 'powerpc' chroot:

    (sid_powerpc-dchroot)edmonds@partch:~$ gcc -dM -E - < /dev/null | grep -c __ppc__
    0
    (sid_powerpc-dchroot)edmonds@partch:~$ gcc -dM -E - < /dev/null | grep -c __LP64__
    0
@xfxyjwf
Copy link
Contributor

xfxyjwf commented Sep 18, 2014

Could you sign this Google Individual Contributor License Agreement?
https://developers.google.com/open-source/cla/individual?csw=1

Let me know when you are done.

@edmonds
Copy link
Contributor Author

edmonds commented Sep 18, 2014

Just submitted the CLA.

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Sep 18, 2014

Thanks.

xfxyjwf added a commit that referenced this pull request Sep 18, 2014
Remove GOOGLE_PROTOBUF_ARCH_PPC
@xfxyjwf xfxyjwf merged commit 7b6c5d5 into protocolbuffers:master Sep 18, 2014
@edmonds edmonds deleted the branches/no_ppc branch September 19, 2014 00:51
copybara-service bot pushed a commit that referenced this pull request Dec 14, 2023
Before, every charAt would emit (on android):
```
    0x00002104    adrp x17, #+0x1000 (addr 0x3000)
    0x00002108    ldr w17, [x17, #20]
    0x0000210c    ldr x0, [x0, #128]
    0x00002110    ldr x0, [x0, #328]
    0x00002114    ldr lr, [x0, #24]
    0x00002118    blr lr <-- Call into String.charAt(int)
```
Now, it emits the inlined implementation of charAt (branch is for possibly compressed strings):
```
    0x000020b4    ldur w16, [x4, #-8]
    0x000020b8    tbnz w16, #0, #+0xc (addr 0x20c4)
    0x000020bc    ldrb w4, [x4, x0]
    0x000020c0    b #+0x8 (addr 0x20c8)
    0x000020c4    ldrh w4, [x4, x0, lsl #1]
```

PiperOrigin-RevId: 590821750
copybara-service bot pushed a commit that referenced this pull request Dec 15, 2023
Before, every charAt would emit (on android):
```
    0x00002104    adrp x17, #+0x1000 (addr 0x3000)
    0x00002108    ldr w17, [x17, #20]
    0x0000210c    ldr x0, [x0, #128]
    0x00002110    ldr x0, [x0, #328]
    0x00002114    ldr lr, [x0, #24]
    0x00002118    blr lr <-- Call into String.charAt(int)
```
Now, it emits the inlined implementation of charAt (branch is for possibly compressed strings):
```
    0x000020b4    ldur w16, [x4, #-8]
    0x000020b8    tbnz w16, #0, #+0xc (addr 0x20c4)
    0x000020bc    ldrb w4, [x4, x0]
    0x000020c0    b #+0x8 (addr 0x20c8)
    0x000020c4    ldrh w4, [x4, x0, lsl #1]
```

PiperOrigin-RevId: 590821750
copybara-service bot pushed a commit that referenced this pull request Dec 15, 2023
Before, every charAt would emit (on android):
```
    0x00002104    adrp x17, #+0x1000 (addr 0x3000)
    0x00002108    ldr w17, [x17, #20]
    0x0000210c    ldr x0, [x0, #128]
    0x00002110    ldr x0, [x0, #328]
    0x00002114    ldr lr, [x0, #24]
    0x00002118    blr lr <-- Call into String.charAt(int)
```
Now, it emits the inlined implementation of charAt (branch is for possibly compressed strings):
```
    0x000020b4    ldur w16, [x4, #-8]
    0x000020b8    tbnz w16, #0, #+0xc (addr 0x20c4)
    0x000020bc    ldrb w4, [x4, x0]
    0x000020c0    b #+0x8 (addr 0x20c8)
    0x000020c4    ldrh w4, [x4, x0, lsl #1]
```

PiperOrigin-RevId: 591147406
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.

None yet

2 participants