Mercurial > hg > truffle
diff src/cpu/sparc/vm/graalCodeInstaller_sparc.cpp @ 21255:ccddbb1409d2
[SPARC] Implement Narrow OOPS
author | Stefan Anzinger <stefan.anzinger@oracle.com> |
---|---|
date | Wed, 06 May 2015 17:13:50 +0200 |
parents | f7d45e2426d4 |
children |
line wrap: on
line diff
--- a/src/cpu/sparc/vm/graalCodeInstaller_sparc.cpp Wed May 06 17:10:58 2015 +0200 +++ b/src/cpu/sparc/vm/graalCodeInstaller_sparc.cpp Wed May 06 17:13:50 2015 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,7 +45,13 @@ Handle obj = HotSpotObjectConstantImpl::object(constant); jobject value = JNIHandles::make_local(obj()); if (HotSpotObjectConstantImpl::compressed(constant)) { - fatal("unimplemented: narrow oop relocation"); +#ifdef _LP64 + int oop_index = _oop_recorder->find_index(value); + RelocationHolder rspec = oop_Relocation::spec(oop_index); + _instructions->relocate(pc, rspec, 1); +#else + fatal("compressed oop on 32bit"); +#endif } else { NativeMovConstReg* move = nativeMovConstReg_at(pc); move->set_data((intptr_t) value);