Clean up irgen.h a bit
[hiphop-php.git] / hphp / runtime / vm / jit / align-x64.h
blob51764f4ff7ae05649dd9a2cdea0446eb7fbc2aff
1 /*
2 +----------------------------------------------------------------------+
3 | HipHop for PHP |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-2016 Facebook, Inc. (http://www.facebook.com) |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
17 #ifndef incl_HPHP_JIT_ALIGN_X64_H_
18 #define incl_HPHP_JIT_ALIGN_X64_H_
20 #include "hphp/runtime/vm/jit/types.h"
21 #include "hphp/runtime/vm/jit/alignment.h"
23 #include "hphp/util/data-block.h"
25 namespace HPHP { namespace jit {
27 struct CGMeta;
29 namespace x64 {
31 ///////////////////////////////////////////////////////////////////////////////
34 * Mirrors the API of align.h.
37 bool is_aligned(TCA frontier, Alignment alignment);
39 void align(CodeBlock& cb, CGMeta* meta,
40 Alignment alignment, AlignContext context);
42 constexpr size_t cache_line_size() { return 64; }
45 * Get the AlignInfo for `alignment'; used by relocation.
47 const AlignInfo& alignment_info(Alignment alignment);
49 ///////////////////////////////////////////////////////////////////////////////
51 }}}
53 #endif