Can't you use the same instruction sequence, even from C++ code? Or compile
a small stub that is callable from C++ directly and thereby use the same
instruction sequence?
Also the code stub should work if that's being used by CS and FCG, while
you can inline the code into TF. You just need to make sure to generate the
exactly the same instructions I guess?
IIRC Jaro thought about this already, maybe he can give some advice.

On Thu, Dec 17, 2015 at 8:06 PM, Ben Smith <bi...@chromium.org> wrote:

>
>
> On Wednesday, December 16, 2015 at 7:16:07 PM UTC-8, Benedikt Meurer wrote:
>>
>> You probably need the same guarantees for CS. So how about putting them
>> into a code stub? And calling the stub for the %_ cases in all three
>> compilers?
>>
>
> Yes, that's what I was thinking too, but I was wondering if there was
> another way -- AIUI the code stub has the overhead of a function call for
> all compilers, right?
>
>
>> BTW wouldn't it work if FCG always uses the C++ version?
>>
>
> Maybe I'm misunderstanding when the various compilers are used. But if
> it's possible that some code that was compiled with FCG is being used at
> the same time that compiled with TF is used and they are accessing the same
> shared memory, then it's necessary that they have the same instruction
> sequence.
>
>
>> -- Benedikt
>>
>> Ben Smith <bi...@chromium.org> schrieb am Do., 17. Dez. 2015, 00:01:
>>
>>> Hi v8-dev,
>>>
>>> I added the Atomics API earlier this year (in src/js/harmony-atomics.js
>>> and src/runtime/runtime-atomics.cc). It's currently implemented as runtime
>>> functions using compiler intrinsics. I'd like to add a TurboFan
>>> implementation, but I need to make sure that the generated assembly is the
>>> same in both the full-codegen and for TF. What's the best way to do this?
>>>
>>> FYI, here's the associated bug:
>>> https://bugs.chromium.org/p/v8/issues/detail?id=4614
>>>
>>> Thanks,
>>> -Ben
>>>
>>> --
>>> --
>>> v8-dev mailing list
>>> v8-...@googlegroups.com
>>> http://groups.google.com/group/v8-dev
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "v8-dev" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to v8-dev+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> --
> v8-dev mailing list
> v8-dev@googlegroups.com
> http://groups.google.com/group/v8-dev
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-dev+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to