Commit 28db3119 authored by Cyril SIX's avatar Cyril SIX
Browse files

MPPA - Added test for division int by 2

parent 31d718c4
DIR=general
BINDIR=bin
ASMDIR=asm
TESTNAMES=simple call branch for forvar forvarl branchz branchzu
TESTNAMES=simple call branch for forvar forvarl branchz branchzu div2
CCOMP=../../ccomp
#TESTS=$(addprefix $(DIR)/,$(TESTNAMES))
......
#define SIZE 10
int main(void){
int a[SIZE], b[SIZE], c[SIZE];
int i;
for (i = 0 ; i < SIZE ; i++){
a[i] = i-5;
b[i] = -i+2;
c[i] = (a[i] + b[i]) / 2;
}
/* a = {-5, -4, .., 5}
* b = { 2, 1, .., -8}
*/
for (i = 0 ; i < SIZE ; i++)
if (c[i] != -1)
return c[i];
return 42;
}
/* RETURN VALUE: 42 */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment