Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
Announcements
The Intel sign-in experience is changing in February to support enhanced security controls. If you sign in, click here for more information.

inter-procedural TSX

Shu_W_
Beginner
202 Views

Hello all,

I have once question if we can use TSX in inter-procedural situation. For example, could we place x_begin in foo_a() and place x_end in foo_b()? Thanks a lot!

foo_a(){

             ....
            x_begin();
             ....

}

foo_b(){

            foo_a();
             ......
            x_end();



}

 

0 Kudos
1 Reply
andysem
New Contributor III
202 Views

It depends on what instructions are used in the transactional region (in particular, what instructions are used to call the functions). Have a look at section "15.3.8.1 Instruction Based Considerations" of SDM (http://www.intel.com/sdm/). In particular, you can see the following instructions may cause an abort:

- Far CALL, Far JMP, Far RET, IRET

- SYSENTER, SYSCALL, SYSEXIT, and SYSRET

It doesn't list the near CALL or RET (i.e. the call that doesn't qualify a segment register), so with normal userspace functions you should be fine. Note however that CALL and RET modify stack, which is added to the transaction working set and may result in abort in its own right.

 

Reply