Displaying 7 results from an estimated 7 matches for "myunion".
2009 Sep 23
2
[LLVMdev] About porting llvm-gcc frontend.
...porting llvm-gcc frontend. We have ported GCC4.2 for our target. So I move *.h *.md and *.c to llvm-gcc. I do not implement any LLVM MACRO, and use default action of llvm-gcc. I get a new llvm-gcc for our target. But I get a bug.
/******************************/
//#include <stdio.h>
union MYunion {
unsigned char uc ;
int ui;
} myunion;
void vfu1(union MYunion u) {
u.ui = 99;
}
void unions() {
myunion.ui = 0;
vfu1(myunion);
iequals(244, myunion.ui, 0);
}
int iequals( int line, int val1, int val2) {
printf("in iequals: line = %d, val1 = %d, val2 = %d\n", lin...
2009 Sep 24
0
[LLVMdev] About porting llvm-gcc frontend.
Hi 任坤,
> void vfu1(union MYunion u) {
> u.ui = 99;
> }
here u is passed by copy, so vfu1 has no externally
visible effect. I think you meant: union MYunion *u
> define void @vfu1(%struct.MYunion* byval align 4 %u) nounwind {
Here "byval" means that a pointer to a temporary copy of u is being
passed, not...
2004 Feb 24
1
Inheriting from factors + co.
...ss as data part
it won't work with factors or other non-formal classes.
B)
Since it is sufficient to use anything that inherits from "vector" and
"factor", I also tried the following one which seems to be cleaner than
using "ANY" directly.
setClassUnion("myunion", representation("vector", "factor")) #
works
setClass("myclass", representation("myunion", x="numeric",
y="numeric"))
new("myclass", 1:10) # fails
Now it isn't possible to assign anything as data part at all, as lo...
2010 Jan 15
2
[LLVMdev] [PATCH] - Union types, attempt 2
...haps to satisfy
alignment constraints, but that would be architecture dependent and I
assume should therefore be invisible). Correct?
If that argument is persuasive, then the following seems a bit more
consistent with the existing syntax:
; Manipulation of a union register variable
%myUnion = unioncast i32, %myValue to union {i32, float}
%fieldValue = unioncast union {i32, float} %myUnion to i32
; %fieldValue == %myValue
This specialized union cast fits the pattern of having specialized cast
operations between value and pointer as opposed to two values or two
pointers.
T...
2010 Jan 16
0
[LLVMdev] [PATCH] - Union types, attempt 2
...aints, but that would be architecture dependent and I
> assume should therefore be invisible). Correct?
>
> If that argument is persuasive, then the following seems a bit more
> consistent with the existing syntax:
>
> ; Manipulation of a union register variable
> %myUnion = unioncast i32, %myValue to union {i32, float}
> %fieldValue = unioncast union {i32, float} %myUnion to i32
> ; %fieldValue == %myValue
>
> This specialized union cast fits the pattern of having specialized cast
> operations between value and pointer as opposed to two va...
2010 Jan 15
0
[LLVMdev] [PATCH] - Union types, attempt 2
On Fri, Jan 15, 2010 at 12:41 AM, Joachim Durchholz <jo at durchholz.org>wrote:
> Talin schrieb:
>
> Well, the fact that union members have to be indexed by number means that
>> the ordering has to be part of the type - so even though type-theoretically
>> union { i32, float } is the same as union { float, i32 }, in my
>> implementation they are distinct types.
2010 Jan 15
2
[LLVMdev] [PATCH] - Union types, attempt 2
Talin schrieb:
> Well, the fact that union members have to be indexed by number means
> that the ordering has to be part of the type - so even though
> type-theoretically union { i32, float } is the same as union { float,
> i32 }, in my implementation they are distinct types. However, from the
> standpoint of a frontend, this is not a great concern, because the
> frontend