Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / native_client / tests / toolchain / far_caller.c
1 /*
2  * Copyright (c) 2013 The Native Client Authors. All rights reserved.
3  * Use of this source code is governed by a BSD-style license that can be
4  * found in the LICENSE file.
5  */
6
7 #include <assert.h>
8 #include <stdint.h>
9 #include <stdlib.h>
10
11 void far_away(void);
12
13 int main(void) {
14   /*
15    * This is useful test only if the branch distance here is more than
16    * 32MB, which is the limit for ARM branches.
17    */
18   assert((uintptr_t) &far_away > (uintptr_t) &main);
19   assert((uintptr_t) &far_away - (uintptr_t) &main > (32 << 20));
20   far_away();
21   return 1;
22 }