Here need your help

Hi all

when i compiled llvm-3.0 with icedtea1.11.4 together,A memory_barrier error happened ,And now I write to all of you for the following questions need your help and suggestion :
1, Is any function which can replace the “make_function” in the following function,
2 , Or is there any different paramters in make_function with the similar action with the following one
3 ,Is there a function similar with “nop” which can return a address in LLVM or Shark ,

Value* SharkBuilder::memory_barrier() {
return make_function(
#if defined(ARM)
(address) 0xffff0fa0, // __kernel_dmb
#else
“llvm.memory.barrier”,
#endif // ARM
“11111”, “v”);
}

what’s more the Dir of the function is :/openjdk-ecj/hotspot/src/share/vm/shark/sharkBuild.cpp

Thank you very much and looking forward to your reply

BR//Amiko

Hi Liu,

    when i compiled llvm-3.0 with icedtea1.11.4 together,A memory_barrier
error happened ,And now I write to all of you for the following questions need
your help and suggestion :
    1, Is any function which can replace the "make_function" in the following
function,
    2 , Or is there any different paramters in make_function with the similar
action with the following one
    3 ,Is there a function similar with "nop" which can return a address in
LLVM or Shark ,

Value* SharkBuilder::memory_barrier() {
      return make_function(
#if defined(ARM)
            (address) 0xffff0fa0, // __kernel_dmb
#else
               "llvm.memory.barrier",
#endif // ARM
     "11111", "v");
}

   You said you have "memory_barrier" error, what exact the error
message is? Your poposed solution is not relevant to the
"memory_barrier" error, but this is just my opinion. I think you should
post "memory_barrier" error here so that others can give you a better
guess.

HTH,
chenwj

In newer versions of LLVM, llvm.memory.barrier has been replaced by
new atomic instructions; you're probably interested in the "fence"
instruction in particular. See
http://llvm.org/docs/LangRef.html#i_fence

-Eli

Hi,

I'm afraid you may have asked your question on the wrong list.
"make_function" does not appear in the LLVM source, so it's almost
certainly part of icedtea. Because of that, the LLVM-specific answers
to your questions will probably not be that useful. However:

    1, Is any function which can replace the "make_function" in the
following function,

Not in LLVM. It looks like our closest equivalent is a "fence"
instruction. It could probably do what you want with the correct
arguments (a "fence seq_cst" covers all barriers I can bring to mind),
but the details of what's needed are likely buried in your non-LLVM
code.

    2 , Or is there any different paramters in make_function with the
similar action with the following one

Haven't the foggiest.

    3 ,Is there a function similar with "nop" which can return a address in
LLVM or Shark ,

This sounds dodgy to me. If you really wanted to you could just return
an "undef" pointer (or 0 as a valid LLVM Value). But barriers are
there for a reason, and presumably something will try to use the
pointer you're returning so an invalid one may well be spectacularly
unhelpful.

It all comes down to icedtea again.

Tim.

Hi all
A new bug is happend when I work on the icedtea1-11.4 against LLVM3.0 ,I Compiler the twos with below command line

LLVM-3.0:
./configure --enable-shared
make
make install
And final get a LLVM3.0.so
shark:
./configure --enable-zero --enable-shark --with_jdk_home=/home/j2sdk-image
make hotspot
And final get a libjvm.so
However when run a java -version the fllowing the error happed
Error while creating Shark JIT: Unable to find target for this triple (no targets are registered)

I have no idea how to register the shark JIT into my build ,can not add --enable-shark is ok ,is any body know how to deal with it. Thank you very much ,And looking forward to your reply ,and it is great helpful with my job ,

thanks again

ps my plateform is : MIPS based