Skip to content

Support of __bic_SR_register_on_exit and __bis_SR_register_on_exit builtins #5

@chbessonova

Description

@chbessonova

These two built-ins are supported by TI/IAR/GCC compilers directly, and not declared/defined in in430.h as other similar built-ins.
Since these BIs are not supported by clang, it causes link error, which made not possible to build targets like Contiki.

This is from gcc docs:

__bic_SR_register_on_exit (int mask)
This clears the indicated bits in the saved copy of the status register that currently resides on the stack.
This only works inside interrupt handlers and the changes to the status register only take effect after the handler returns.
__bis_SR_register_on_exit (int mask) 
This sets the indicated bits in the saved copy of the status register that currently resides on the stack.
This only works inside interrupt handlers and the changes to the status register only take effect after the handler returns.

It looks to me that it is not possible to achieve the same functionality by inline asm, but I'll will investigate further.

If someone has some thoughts about this, I'll appreciate for the help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    msp430MSP430 target

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions