Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Unified Diff: third_party/yasm/patched-yasm/libyasm/bc-data.c

Issue 11364046: Update Yasm to 1.2.0 (Yasm Part 1/3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/yasm/patched-yasm/libyasm/bc-align.c ('k') | third_party/yasm/patched-yasm/libyasm/bc-incbin.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/yasm/patched-yasm/libyasm/bc-data.c
===================================================================
--- third_party/yasm/patched-yasm/libyasm/bc-data.c (revision 165590)
+++ third_party/yasm/patched-yasm/libyasm/bc-data.c (working copy)
@@ -25,7 +25,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "util.h"
-/*@unused@*/ RCSID("$Id: bc-data.c 2133 2008-10-07 05:59:29Z peter $");
#include "libyasm-stdint.h"
#include "coretype.h"
@@ -70,7 +69,8 @@
static int bc_data_item_size(yasm_bytecode *bc);
static int bc_data_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
void *add_span_data);
-static int bc_data_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+static int bc_data_tobytes(yasm_bytecode *bc, unsigned char **bufp,
+ unsigned char *bufstart, void *d,
yasm_output_value_func output_value,
/*@null@*/ yasm_output_reloc_func output_reloc);
@@ -203,13 +203,13 @@
}
static int
-bc_data_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+bc_data_tobytes(yasm_bytecode *bc, unsigned char **bufp,
+ unsigned char *bufstart, void *d,
yasm_output_value_func output_value,
/*@unused@*/ yasm_output_reloc_func output_reloc)
{
bytecode_data *bc_data = (bytecode_data *)bc->contents;
yasm_dataval *dv;
- unsigned char *bufp_orig = *bufp;
yasm_intnum *intn;
unsigned int val_len;
unsigned long multiple, i;
@@ -224,7 +224,7 @@
val_len = dv->data.val.size/8;
for (i=0; i<multiple; i++) {
if (output_value(&dv->data.val, *bufp, val_len,
- (unsigned long)(*bufp-bufp_orig), bc, 1,
+ (unsigned long)(*bufp-bufstart), bc, 1,
d))
return 1;
*bufp += val_len;
@@ -480,6 +480,14 @@
return retval;
}
+yasm_value *
+yasm_dv_get_value(yasm_dataval *dv)
+{
+ if (dv->type != DV_VALUE)
+ return NULL;
+ return &dv->data.val;
+}
+
void
yasm_dv_set_multiple(yasm_dataval *dv, yasm_expr *e)
{
« no previous file with comments | « third_party/yasm/patched-yasm/libyasm/bc-align.c ('k') | third_party/yasm/patched-yasm/libyasm/bc-incbin.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698