Index: trunk/vm/port/include/port_vmem.h =================================================================== --- trunk/vm/port/include/port_vmem.h (revision 535850) +++ trunk/vm/port/include/port_vmem.h (working copy) @@ -1,10 +1,10 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with + * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -14,18 +14,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/** - * @author Alexey V. Varlamov - * @version $Revision: 1.1.2.1.4.3 $ - */ +/** @version $Revision: 1.1.2.1.4.3 $*/ #ifndef _PORT_VMEM_H_ #define _PORT_VMEM_H_ /** * @file - * Virtual memory support + * Virtual memory support. * - * Functions to manipulate memory pages in virtual address space: + * Functions to manipulate memory pages in virtual address space: * reserve, de/commit, free, control size and access protection of pages. */ @@ -57,7 +54,8 @@ /** * @defgroup vmem_size Memory page size directives - * These defines can be used instead of explicit calls to port_vmem_page_sizes(). + * These defines can be used instead of explicit calls to + * port_vmem_page_sizes(). * @{ */ /** System default page size*/ @@ -74,7 +72,8 @@ /** * Reserves a continuous memory region in the virtual address space - * of the calling process. + * of the calling process. + * * @param[out] block - descriptor for the reserved memory, required for * further operations with the memory * @param[in,out] address - desired starting address of the region to allocate. If @@ -86,10 +85,11 @@ * @param protectionMode - the bit mask of PORT_VMEM_MODE_* flags * @param pageSize - the desired size of the memory page; should contain * PORT_VMEM_PAGESIZE_DEFAULT, - * PORT_VMEM_PAGESIZE_LARGE or the actual size in bytes + * PORT_VMEM_PAGESIZE_LARGE or the actual size + * in bytes * @param pool - the auxiliary pool to allocate the descriptor data, etc * @return APR_SUCCESS if OK; otherwise, an error code. - * @see port_vmem_page_sizes() + * @sa port_vmem_page_sizes() */ APR_DECLARE(apr_status_t) port_vmem_reserve(port_vmem_t **block, void **address, size_t amount, @@ -97,42 +97,45 @@ size_t pageSize, apr_pool_t *pool); /** -* Commits (a part of) the previously reserved memory region. The allocated memory -* is initialized to zero. -* @param[in,out] address - the starting address of the region to commit; the returned value -* may differ due to page alignment -* @param amount - the size of the region in bytes -* @param block - the descriptor to the reserved virtual memory -* @return APR_SUCCESS if OK; otherwise, an error code. -*/ + * Commits (a part of) the previously reserved memory region. The allocated + * memory is initialized to zero. + * + * @param[in,out] address - the starting address of the region to commit; the + * returned value may differ due to page alignment + * @param amount - the size of the region in bytes + * @param block - the descriptor to the reserved virtual memory + * @return APR_SUCCESS if OK; otherwise, an error code. + */ APR_DECLARE(apr_status_t) port_vmem_commit(void **address, size_t amount, port_vmem_t *block); /** -* Decommits the specified region of committed memory. It is safe to -* decommit a reserved (but not committed) region. -* @param address - the starting address of the region to decommit -* @param amount - the size of the region in bytes -* @param block - the memory region descriptor -* @return APR_SUCCESS if OK; otherwise, an error code. -*/ + * Decommits the specified region of committed memory. It is safe to + * decommit a reserved (but not committed) region. + * + * @param address - the starting address of the region to decommit + * @param amount - the size of the region in bytes + * @param block - the memory region descriptor + * @return APR_SUCCESS if OK; otherwise, an error code. + */ APR_DECLARE(apr_status_t) port_vmem_decommit(void *address, size_t amount, port_vmem_t *block); /** -* Releases previously reserved virtual memory region as a whole. -* If the region was committed, the function first decommits it. -* @param block - the memory region descriptor -* @return APR_SUCCESS if OK; otherwise, an error code. -*/ + * Releases previously reserved virtual memory region as a whole. + * If the region was committed, the function first decommits it. + * + * @param block - the memory region descriptor + * @return APR_SUCCESS if OK; otherwise, an error code. + */ APR_DECLARE(apr_status_t) port_vmem_release(port_vmem_t *block); /** -* Returns a zero-terminated array of supported memory page sizes. -* The first element refers to the system default size and is guaranteed -* to be non-zero. Subsequent elements (if any) provide large page -* sizes. -*/ + * Returns a zero-terminated array of supported memory page sizes. + * The first element refers to the system default size and is guaranteed + * to be non-zero. Subsequent elements (if any) provide large page + * sizes. + */ APR_DECLARE(size_t *) port_vmem_page_sizes(); /** @@ -142,20 +145,20 @@ APR_DECLARE(size_t) port_vmem_used_size(); /** - * Returns the amount of committed memory in bytes + * Returns the amount of committed memory in bytes, * or 0 if this value could not be calculated. */ APR_DECLARE(size_t) port_vmem_committed_size(); /** - * Returns the amount of reserved memory in bytes + * Returns the amount of reserved memory in bytes, * or 0 if this value could not be calculated. */ APR_DECLARE(size_t) port_vmem_reserved_size(); /** - * Returns the maximum amount of memory which could be reserved in bytes - * or 0 if this value could not be calculated + * Returns the maximum amount of memory, which could be reserved in bytes, + * or 0 if this value could not be calculated. */ APR_DECLARE(size_t) port_vmem_max_size(); Index: trunk/vm/port/src/encoder/ia32_em64t/enc_defs.h =================================================================== --- trunk/vm/port/src/encoder/ia32_em64t/enc_defs.h (revision 535850) +++ trunk/vm/port/src/encoder/ia32_em64t/enc_defs.h (working copy) @@ -1,10 +1,10 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with + * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at + * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -14,10 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/** - * @author Alexander V. Astapchuk - * @version $Revision: 1.1.2.2.4.4 $ - */ +/** @version $Revision: 1.1.2.2.4.4 $*/ #ifndef _ENCODER_DEFS_H_ #define _ENCODER_DEFS_H_ @@ -35,24 +32,16 @@ #include #ifndef COUNTOF - /** - * Number of items in an array. - */ +/** Number of items in an array.*/ #define COUNTOF(a) (sizeof(a)/sizeof(a[0])) #endif #ifdef _EM64T_ - /** - * A stack pointer of default platform's size. - */ +/** A stack pointer of default platform's size.*/ #define REG_STACK RegName_RSP - /** - * A max GP register (with a highest index number) - */ +/** A max GP register (with a highest index number)*/ #define REG_MAX RegName_R15 - /** - * Total number of GP registers including stack pointer. - */ +/** Total number of GP registers including stack pointer.*/ #define MAX_REGS 15 #else #define REG_STACK RegName_ESP @@ -69,35 +58,31 @@ * Luckily, the long type serves as desired. */ typedef long int_ptr; -/** - * A number of bytes 'eaten' by an ordinary PUSH/POP. - */ +/** A number of bytes 'eaten' by an ordinary PUSH/POP.*/ #define STACK_SLOT_SIZE (sizeof(void*)) - -/** - * A recommended by Intel Arch Manual aligment for instructions that - * are targets for jmps. +/** A recommended by Intel Arch Manual aligment for instructions that are targets + * for jmps. */ #define JMP_TARGET_ALIGMENT (16) -/** - * A maximum possible size of native instruction. - */ +/** A maximum possible size of native instruction.*/ #define MAX_NATIVE_INST_SIZE (15) -/** +/** * The enum OpndKind describes an operand's location - memory, immediate or a register. * It can be used as a bit mask. */ enum OpndKind { - /** - * A change must be balanced with at least the following places: - * Ia32::Constraint-s use the OpndKind as a mask - * encoder.cpp & encoder_master_info.cpp uses OpndKind as an index for hashing - * - perhaps there are much more places - * - * NOTE: an MMXReg kind is incompatible with the current constraints framework, - * as it's not encoded as a mask. - */ +/** + * A change must be balanced with at least the following places: + * + * + * @note An MMXReg kind is incompatible with the current constraints framework, + * as it's not encoded as a mask. + */ OpndKind_Null=0, OpndKind_GPReg = 0x01, OpndKind_MinRegKind = OpndKind_GPReg, OpndKind_SReg = 0x02, @@ -127,13 +112,14 @@ enum OpndSize { - /** - * A change must be balanced with at least the following places: - * Ia32IRConstants.h :: getByteSize() uses some presumptions about OpndSize_ values - * Ia32::Constraint-s use the OpndSize as a mask - * encoder.cpp & encoder_master_info.cpp uses OpndSize as an index for hashing - * - perhaps there are much more places - */ +/** + * A change must be balanced with at least the following places: + *