在 2022/8/5 下午5:53, Xi Ruoyao 写道:
On Fri, 2022-08-05 at 15:58 +0800, Lulu Cheng wrote:
I think the model of precpu is not very easy to describe. 
model(got)?model(global)?
I also want to use attribute model and -mcmodel together, but this is just an 
initial idea,
what do you think?
It seems I had some misunderstanding about IA-64 model attribute.  IA-64
actually does not have -mcmodel= options.  And a code model only
specifies where "the GOT and the local symbols" are, but our new
attribute should apply for both local symbols and global symbols.  So I
don't think we should strongly bind the new attribute and -mcmodel.

Maybe, __attribute__((addressing_model(got/pcrel32/pcrel64/abs32/abs64))
?  I think they are explicit enough (we can implement got and pc32
first, and adding the others when we implement other code models).

I still think it makes a little bit more sense to put attribute(model) and -mcmodel together.

-mcmodel sets the access range of all symbols in a single file, and attribute (model) sets the

accsess range of a single symbol in a file. For example __attribute__((model(normal/large/extreme))).

Reply via email to