This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

__schedule_barrier function creates NOPs

Using uvision4 to build project for Cortex-M3. When I look at assembly listing I notice that the __schedule_barrier() call generates two NOPs instead of using one of the ARM memory barrier instructions. Is this correct?

Thanks

Parents
  • What is it that you're trying to acheive by using __schedule_barrier()?

    The documentation <infocenter.arm.com/.../armccref_cjaefhhi.htm> doesn't indicate that __schedule_barrier generates any instructions. In fact if it is producing NOP instructions it seems to be contradicting the documentation.

    It would be useful to have an example. I see no NOP instructions when I build this for Cortex-M3 -O2 -Ospace:

    volatile int x;
    void f() {
      ++x;
      __schedule_barrier();
      ++x;
    }
    

Reply
  • What is it that you're trying to acheive by using __schedule_barrier()?

    The documentation <infocenter.arm.com/.../armccref_cjaefhhi.htm> doesn't indicate that __schedule_barrier generates any instructions. In fact if it is producing NOP instructions it seems to be contradicting the documentation.

    It would be useful to have an example. I see no NOP instructions when I build this for Cortex-M3 -O2 -Ospace:

    volatile int x;
    void f() {
      ++x;
      __schedule_barrier();
      ++x;
    }
    

Children