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 7750843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:23:44+00:00 2026-06-01T11:23:44+00:00

This question will be short and sweet. I know an instruction can occur between

  • 0

This question will be short and sweet.

I know an instruction can occur between instruction but can an interrupt happen during an instruction? Can a load multiple instruction be interrupted before it’s loaded all the values into the registers?

mov r0, r1
                 < interrupt can happen here
ldm r0, {r1-r4}  < can an interrupt happen **during** a load multiple instruction?
  • 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-01T11:23:45+00:00Added an answer on June 1, 2026 at 11:23 am

    The load multiple instructions are explicitly not atomic. See section A3.5.3 of the ARM V7C architecture reference manual.

    LDM, LDC, LDC2, LDRD, STM, STC, STC2, STRD, PUSH, POP, RFE, SRS, VLDM,
    VLDR, VSTM, and VSTR instructions are executed as a sequence of
    word-aligned word accesses. Each 32-bit word access is guaranteed to
    be single-copy atomic. The architecture does not require subsequences
    of two or more word accesses from the sequence to be single-copy
    atomic.

    If you read on, you’ll find out that the LDM/STM instructions can be aborted by an interrupt (and restarted from the beginning on interrupt return). LDM and STM instructions can always be interrupted by a data abort, so they’re non atomic in that sense. Otherwise, the ARMv7-A architecture does its best to help you out. For interrupts, they can only be interrupted if low interrupt latency is enabled, AND normal memory is being accessed. So at the very least, you won’t get repeated accesses to device memory. You don’t want to do anything that expects atomic read/writes of normal memory though.

    On v7-M, LDM and STM can be interrupted at any time (see section B1.5.10 of the ARMv7-M Architecture Reference Manual). It’s implementation defined whether or not the instruction is restarted from the beginning of the list of loads/stores, or whether it’s restarted from where it left off. As the ARM says:

    The ARMv7-M architecture supports continuation of, or restarting from
    the beginning, an abandoned LDM or STM instruction as outlined below.
    Where an LDM or STM is abandoned and restarted (ICI bits are not
    supported), the instructions should not be used with volatile memory.

    In other words, don’t rely on LDM or STM being atomic if you’re trying to write portable code.

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

Sidebar

Related Questions

It might be a long shot posting this question here but we will see.
My guess is that this question will fall under the category of duh, but,
I guess this question will sound familiar, but I am yet another programmer baffled
I know this question will be closed because I studied many example of this
I hope this question will not be rejected as there is no code. But
I know this question could be in vain, but it's just out of curiosity,
I am dealing with a short deadline here, so I will ask this question
This question will be a little longer and I am sorry for that :)
( Late edit: This question will hopefully be obsolete when Java 7 comes, because
Sorry if this question will sound too chaotic, feel free to edit it. I

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.