x86 inline assembly should provide an alternative for Intel syntax

Open
#383 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
cpp

Research direction

Start at include/boost/thread/win32/interlocked_read.hpp around line 158 and inspect the existing x86 inline assembly. Compare that code with the proposed alternative in the issue, then verify the assembly works for the intended Intel syntax case. Done means the file provides the requested alternative without breaking the existing behavior.

Written by the indexing model from the issue text.

Description

Instead of
https://github.com/boostorg/thread/blob/52b62ee7b029028126c4eaf36e377833b0666510/include/boost/thread/win32/interlocked_read.hpp#L158

we should have

 __asm__ __volatile__ ("{ movl %1, %0 | mov %0, %1 }" : "=r" (res) : "m" (*x) : "memory"); 
Dominant language
C++
Stars
213
Forks
171
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/thread

All issues in boostorg/thread

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.