Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix issue open64-compiler#35 for WHIRL2llvm
The offset is the distance between the field of struct and the start of struct, but the parameter just be pushed one time if the parameter just hold one register. So we need to align down the offset of field to register size. 1. The w2ll will crash if compile the code like that: ``` typedef struct quantum_matrix_struct { int rows; int cols; } quantum_matrix; void quantum_print_matrix(quantum_matrix m) { int i, j; for(i=0; i<m.rows; i++) { for(j=0; j<m.cols; j++) { printf("%d\n", 1); } } } ``` 2. Error Log: ``` Find_parm_type cannot find ``` Signed-off-by: Zhijin Zeng <[email protected]>
- Loading branch information