Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8653055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:27:04+00:00 2026-06-12T14:27:04+00:00

This is the disassembly of syscall() on iPhone. (gdb) disass syscall Dump of assembler

  • 0

This is the disassembly of syscall() on iPhone.

(gdb) disass syscall
Dump of assembler code for function syscall:
0x3195fafc <syscall+0>: mov     r12, sp
0x3195fb00 <syscall+4>: push    {r4, r5, r6, r8}
0x3195fb04 <syscall+8>: ldm     r12, {r4, r5, r6}
0x3195fb08 <syscall+12>:        mov     r12, #0 ; 0x0
0x3195fb0c <syscall+16>:        svc     0x00000080
0x3195fb10 <syscall+20>:        pop     {r4, r5, r6, r8}
0x3195fb14 <syscall+24>:        bcc     0x3195fb2c <syscall+48>
0x3195fb18 <syscall+28>:        ldr     r12, [pc, #4]   ; 0x3195fb24 <syscall+40>
0x3195fb1c <syscall+32>:        ldr     r12, [pc, r12]
0x3195fb20 <syscall+36>:        b       0x3195fb28 <syscall+44>
0x3195fb24 <syscall+40>:        cfldrdeq        mvd15, [r12], #992
0x3195fb28 <syscall+44>:        bx      r12
0x3195fb2c <syscall+48>:        bx      lr
End of assembler dump.
  1. Can someone please explain what instructions at offsets +28,+32 are doing? At +28, the value of r12 is 0 (set at +12), so looks like r12 is being set to (in C notation) *(pc + 4). At +32, r12 is set to *(pc + r12) – note that this instruction is not compiling – see #3 below. The ‘b’ at +36 jumps to +44, which returns to the address in r12. So what value was loaded into r12 by +28 & +32?

  2. What does the cfldrdeq instruction at +40 do? I have check the ARM instruction set & searched for it, but not found anything.

  3. I added this code to my C program using asm(). When compiling, the compiler shows these errors. Any idea how to get around this?

    /var/folders/62/3px_xsd56ml5gz18lp8dptjc0000gv/T//ccDThXFx.s:7607:cannot use register index with PC-relative addressing — ldr r12,[pc,r12]'
    /var/folders/62/3px_xsd56ml5gz18lp8dptjc0000gv/T//ccDThXFx.s:7609:selected processor does
    not support
    cfldrdeq mvd15,[r12],#992′

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T14:27:05+00:00Added an answer on June 12, 2026 at 2:27 pm

    It makes more sense if you know of the small gotcha surrounding reading the PC: most instructions that read PC see a value of address_of_current_instruction+8 (except +4 in thumb mode, and ldm in ARM mode might be either +8 or +12 IIRC).

    cfldrdeq mvd15, [r12], #992 is not meant to be an instruction; it’s a relative relocation that points to a relocation the DATA section. In the DATA section, there’ll be a dynamic relocation that points to the actual address. Typical seudocode looks something like this

      ldr r12,[pc,#small_offset_to_foo]
      ldr r12,[pc,r12]
      bx r12
    
      ... a short distance away ...
    
    foo:
      int relative_offset_of_bar_from_the_second_ldr
      ... a galaxy far far away ...
    
    bar:
      int pointer_to_the_actual_syscall
    

    I do not know why the disassembly for syscall() places “foo” between ldr r12,[pc,r12] and bx r12, causing the branch over the non-instruction “foo”.

    It is also worth mentioning that simply pasting the code shown will almost certainly not work: you don’t have the relocation that points to the actual implementation of syscall (in a debugger, step past bx r12 and you should get there); you’ll just branch to some randomish address.

    The error “cannot use register index with PC-relative addressing” is apparently because you’re compiling in Thumb mode (the listing is ARM code). As for cfldrdeq, I believe it’s just a conditional cfldrd instruction (the “eq” is a condition code), which Google suggests is related to a the Cirrus Logic “Maverick” processor series.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In this disassembly from VC++ a function call is being made. The compiler MOVs
I'm looking at some disassembly code and see something like 0x01c8f09b <+0015> mov 0x8(%edx),%edi
I disassembled certain binary file(Linux elf). And I found this code : movsl %ds:(%esi),%es:(%edi)
This is my code: <CheckBox android:id=@+id/sprint_checkbox android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/sprint_game /> <CheckBox android:id=@+id/marathon_checkbox android:layout_width=fill_parent android:layout_height=wrap_content
This code below allows me to find the word error in all my files
This works. $(document).ready(function(){ $(.items article).click(function(){ window.location=$(this).find(a).attr(href); return false; }); }); However , when the
This is my sample code: SPWeb web = SPContext.Current.Web SPList list = web.Lists[TestList]; try
I disassembled an .exe file and got this as its first line. push ebp
I've written this bit of code to process a URL in string form to
I'm relatively(read: stupid newbie) familiar with disassembly but this bit stumped me: I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.